diff options
author | Dan Carpenter <error27@gmail.com> | 2010-11-12 07:31:46 +0300 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-09 09:24:13 -0600 |
commit | 057f02a38e67a944a2d0b89bb0111efb9dbe6e6e (patch) | |
tree | 0ca2b93e59d960da0973ed7882ffac06e74c2a45 /drivers/scsi | |
parent | 6313e3c21743cc88bb5bd8aa72948ee1e83937b6 (diff) | |
download | blackbird-op-linux-057f02a38e67a944a2d0b89bb0111efb9dbe6e6e.tar.gz blackbird-op-linux-057f02a38e67a944a2d0b89bb0111efb9dbe6e6e.zip |
[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')
-rw-r--r-- | drivers/scsi/osd/osd_initiator.c | 4 |
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) /* 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 (IS_ERR(bio)) + return PTR_ERR(bio); bio->bi_rw |= REQ_WRITE; |