Skip to content

Commit

Permalink
target/pscsi: blk_make_request() returns an ERR_PTR()
Browse files Browse the repository at this point in the history
The check is wrong here because blk_make_request() returns an
ERR_PTR() and it doesn't return NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Dan Carpenter authored and Nicholas Bellinger committed Nov 2, 2011
1 parent 3151d06 commit ed327ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_pscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ static int pscsi_do_task(struct se_task *task)

req = blk_make_request(pdv->pdv_sd->request_queue, hbio,
GFP_KERNEL);
if (!req) {
if (IS_ERR(req)) {
pr_err("pSCSI: blk_make_request() failed\n");
goto fail;
}
Expand Down

0 comments on commit ed327ed

Please sign in to comment.