remove unnessecairy check in drivers/scsi/sg.c
Subsystems (2)
PATCH 1/1 remove unnessecairy check in drivers/scsi/sg.c
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 <[email protected]>
drivers/scsi/sg.c renamed from drivers/scsi/sg.c.orig +1 -1
@@ -1828,7 +1828,7 @@ sg_build_indirect(Sg_scatter_hold * schpint 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 */