Commit:     b2111217df52827916141789c87d614ae45236db
Parent:     3f1b0e1f287547903f11fa1e6de7d2765597766e
Author:     Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 15 23:41:53 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 09:05:52 2007 -0700

    isapnp: remove pointless check of 'type' against 0 in isapnp_read_tag()
    In drivers/pnp/isapnp/core.c::isapnp_read_tag() there is a test of 'type'
    being == 0 a bit down in the function.  That test doesn't make any sense.
    If 'type' could indeed be NULL, then the test happens way too late as we'd
    already have tried to dereference the pointer earlier and looking at the
    callers it also turns out that there is no way type can ever actually be
    So the test is completely pointless and should just be removed.
    Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/pnp/isapnp/core.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index a0b1587..914d00c 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -370,8 +370,6 @@ static int __init isapnp_read_tag(unsigned char *type, 
unsigned short *size)
 #if 0
        printk(KERN_DEBUG "tag = 0x%x, type = 0x%x, size = %i\n", tag, *type, 
-       if (type == 0)                          /* wrong type */
-               return -1;
        if (*type == 0xff && *size == 0xffff)   /* probably invalid data */
                return -1;
        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to