public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] target: blk_make_request() returns an ERR_PTR()
@ 2011-10-31  7:03 Dan Carpenter
  2011-11-02 15:51 ` Nicholas A. Bellinger
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-10-31  7:03 UTC (permalink / raw)
  To: Nicholas A. Bellinger; +Cc: linux-scsi, target-devel, kernel-janitors

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>

diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index b452efe..ed32e1e 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -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;
 		}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] target: blk_make_request() returns an ERR_PTR()
  2011-10-31  7:03 [patch] target: blk_make_request() returns an ERR_PTR() Dan Carpenter
@ 2011-11-02 15:51 ` Nicholas A. Bellinger
  0 siblings, 0 replies; 2+ messages in thread
From: Nicholas A. Bellinger @ 2011-11-02 15:51 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-scsi, target-devel, kernel-janitors

On Mon, 2011-10-31 at 10:03 +0300, Dan Carpenter wrote:
> The check is wrong here because blk_make_request() returns an
> ERR_PTR() and it doesn't return NULL.
> 
> 

Applied and queuing for the next pull.  Thanks Dan!

--nab

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-02 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31  7:03 [patch] target: blk_make_request() returns an ERR_PTR() Dan Carpenter
2011-11-02 15:51 ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox