target: blk_make_request() returns an ERR_PTR()
Subsystems (3)
PATCH 1/1 target: 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 <[email protected]>
drivers/target/target_core_pscsi.c +1 -1
@@ -1092,7 +1092,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; }
Quoted 4 lines · Dan Carpenter
The check is wrong here because
blk_make_request()returns anERR_PTR()and it doesn't return NULL.
Applied and queuing for the next pull. Thanks Dan!
--nab