提交 ed327ed3 编写于 作者: D Dan Carpenter 提交者: Nicholas Bellinger

target/pscsi: blk_make_request() returns an ERR_PTR()

The check is wrong here because blk_make_request() returns an
ERR_PTR() and it doesn't return NULL.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
上级 3151d069
...@@ -1091,7 +1091,7 @@ static int pscsi_do_task(struct se_task *task) ...@@ -1091,7 +1091,7 @@ static int pscsi_do_task(struct se_task *task)
req = blk_make_request(pdv->pdv_sd->request_queue, hbio, req = blk_make_request(pdv->pdv_sd->request_queue, hbio,
GFP_KERNEL); GFP_KERNEL);
if (!req) { if (IS_ERR(req)) {
pr_err("pSCSI: blk_make_request() failed\n"); pr_err("pSCSI: blk_make_request() failed\n");
goto fail; goto fail;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册