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

[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
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment