]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] sg: remove unnecessary check
authorEric Sesterhenn <snakebyte@gmx.de>
Wed, 23 May 2007 21:41:36 +0000 (14:41 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Mon, 28 May 2007 14:08:32 +0000 (09:08 -0500)
coverity spotted this (cid #758).  All callers dereference sfp, so we dont
need this check.  In addition to this, we dereference it earlier in the
function.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sg.c

index 0c691a60a756f6144d01706e566d7704a4e41075..85d38940a6c91e2b0d5b546bb0705bdd3ab37f8a 100644 (file)
@@ -1842,7 +1842,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
        int blk_size = buff_size;
        struct page *p = NULL;
 
-       if ((blk_size < 0) || (!sfp))
+       if (blk_size < 0)
                return -EFAULT;
        if (0 == blk_size)
                ++blk_size;     /* don't know why */