* [Patch] remove unnessecairy check in drivers/scsi/sg.c
@ 2006-09-24 22:51 Eric Sesterhenn
0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-09-24 22:51 UTC (permalink / raw)
To: linux-kernel; +Cc: dgilbert
hi,
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>
--- linux-2.6.18-git3/drivers/scsi/sg.c.orig 2006-09-24 22:11:36.000000000 +0200
+++ linux-2.6.18-git3/drivers/scsi/sg.c 2006-09-24 22:12:14.000000000 +0200
@@ -1828,7 +1828,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:[~2006-09-24 22:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-24 22:51 [Patch] remove unnessecairy check in drivers/scsi/sg.c Eric Sesterhenn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox