diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-09-15 03:25:23 +0000 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-09-15 09:56:21 -0400 |
commit | 38247feb60512a52c4f847933f8f931284dc21f4 (patch) | |
tree | 028aaf0615c7f788852863e927e849571f41bf33 /drivers/scsi/ibmvscsi_tgt | |
parent | 8475c8118551f806176b5af4d0e8657a5f015b95 (diff) |
scsi: ibmvscsis: Fix error return code in ibmvscsis_probe()
Fix to return error code -ENOMEM from the dma mapping error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi_tgt')
-rw-r--r-- | drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 4dd8e5effddb..38b086ee7d7e 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c @@ -3449,6 +3449,7 @@ static int ibmvscsis_probe(struct vio_dev *vdev, vscsi->map_ioba = dma_map_single(&vdev->dev, vscsi->map_buf, PAGE_SIZE, DMA_BIDIRECTIONAL); if (dma_mapping_error(&vdev->dev, vscsi->map_ioba)) { + rc = -ENOMEM; dev_err(&vscsi->dev, "probe: error mapping command buffer\n"); goto free_buf; } |