kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] scsi/osd: checking NULL instead of ERR_PTR()
@ 2010-11-12  4:31 Dan Carpenter
  2010-11-14 13:39 ` Boaz Harrosh
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2010-11-12  4:31 UTC (permalink / raw)
  To: Boaz Harrosh
  Cc: Benny Halevy, James E.J. Bottomley, osd-dev, linux-scsi,
	kernel-janitors

bio_map_kern() returns ERR_PTRs on failure and never returns NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index 0433ea6..b798919 100644
--- a/drivers/scsi/osd/osd_initiator.c
+++ b/drivers/scsi/osd/osd_initiator.c
@@ -951,8 +951,8 @@ static int _osd_req_finalize_cdb_cont(struct osd_request *or, const u8 *cap_key)
 	/* create a bio for continuation segment */
 	bio = bio_map_kern(req_q, or->cdb_cont.buff, or->cdb_cont.total_bytes,
 			   GFP_KERNEL);
-	if (unlikely(!bio))
-		return -ENOMEM;
+	if (unlikely(IS_ERR(bio)))
+		return PTR_ERR(bio);
 
 	bio->bi_rw |= REQ_WRITE;
 

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

end of thread, other threads:[~2010-11-30 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12  4:31 [patch] scsi/osd: checking NULL instead of ERR_PTR() Dan Carpenter
2010-11-14 13:39 ` Boaz Harrosh
2010-11-21 10:31   ` Boaz Harrosh
2010-11-30 10:22     ` Boaz Harrosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).