Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb119935 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by James Bottomley
Browse files

[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: default avatarEric Sesterhenn <snakebyte@gmx.de>
Acked-by: default avatarDouglas Gilbert <dougg@torque.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent deff2627
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */