aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2007-05-23 17:41:36 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-28 10:08:32 -0400
commitfb119935e11b98230f20c500e9f9125ddf0f3a4d (patch)
tree106c15b2a5e805f91a172ac637525a1cf3bdcbda /drivers/scsi/sg.c
parentdeff2627cda995c926788fd9192337ec3febe7b5 (diff)
[SCSI] sg: remove unnecessary check
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>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 0c691a60a756..85d38940a6c9 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1842,7 +1842,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
1842 int blk_size = buff_size; 1842 int blk_size = buff_size;
1843 struct page *p = NULL; 1843 struct page *p = NULL;
1844 1844
1845 if ((blk_size < 0) || (!sfp)) 1845 if (blk_size < 0)
1846 return -EFAULT; 1846 return -EFAULT;
1847 if (0 == blk_size) 1847 if (0 == blk_size)
1848 ++blk_size; /* don't know why */ 1848 ++blk_size; /* don't know why */