From ed327ed337a6ee6919ee092c82ac3edeb63bd4de Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 2 Nov 2011 08:48:15 -0700 Subject: 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: Dan Carpenter Signed-off-by: Nicholas A. Bellinger --- drivers/target/target_core_pscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/target') diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index dad671dee9e9..f941b6232614 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -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; } -- cgit v1.2.3