* [patch 04/28] scsi: remove unnecessary check in drivers/scsi/sg.c
@ 2007-03-27 5:59 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2007-03-27 5:59 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, akpm, snakebyte, dougg
From: Eric Sesterhenn <snakebyte@gmx.de>
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>
Cc: Douglas Gilbert <dougg@torque.net>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/scsi/sg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/scsi/sg.c~remove-unnecessary-check-in-drivers-scsi-sgc drivers/scsi/sg.c
--- a/drivers/scsi/sg.c~remove-unnecessary-check-in-drivers-scsi-sgc
+++ a/drivers/scsi/sg.c
@@ -1837,7 +1837,7 @@ sg_build_indirect(Sg_scatter_hold * schp
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 */
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-27 5:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27 5:59 [patch 04/28] scsi: remove unnecessary check in drivers/scsi/sg.c akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.