aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/osd
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-11-11 23:31:46 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-09 10:24:13 -0500
commit057f02a38e67a944a2d0b89bb0111efb9dbe6e6e (patch)
tree0ca2b93e59d960da0973ed7882ffac06e74c2a45 /drivers/scsi/osd
parent6313e3c21743cc88bb5bd8aa72948ee1e83937b6 (diff)
[SCSI] osd: checking NULL instead of ERR_PTR()
bio_map_kern() returns ERR_PTRs on failure and never returns NULL. [jejb: remove redundant unlikely spotted by Tobias Klauser] Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/osd')
-rw-r--r--drivers/scsi/osd/osd_initiator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index 0433ea6f27c9..b37c8a3c1bb0 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)
951 /* create a bio for continuation segment */ 951 /* create a bio for continuation segment */
952 bio = bio_map_kern(req_q, or->cdb_cont.buff, or->cdb_cont.total_bytes, 952 bio = bio_map_kern(req_q, or->cdb_cont.buff, or->cdb_cont.total_bytes,
953 GFP_KERNEL); 953 GFP_KERNEL);
954 if (unlikely(!bio)) 954 if (IS_ERR(bio))
955 return -ENOMEM; 955 return PTR_ERR(bio);
956 956
957 bio->bi_rw |= REQ_WRITE; 957 bio->bi_rw |= REQ_WRITE;
958 958