提交 fb119935 编写于 作者: E Eric Sesterhenn 提交者: 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: NEric Sesterhenn <snakebyte@gmx.de>
Acked-by: NDouglas Gilbert <dougg@torque.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册