Commit 38247feb authored by Wei Yongjun's avatar Wei Yongjun Committed by Martin K. Petersen

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8475c811
...@@ -3449,6 +3449,7 @@ static int ibmvscsis_probe(struct vio_dev *vdev, ...@@ -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, vscsi->map_ioba = dma_map_single(&vdev->dev, vscsi->map_buf, PAGE_SIZE,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
if (dma_mapping_error(&vdev->dev, vscsi->map_ioba)) { if (dma_mapping_error(&vdev->dev, vscsi->map_ioba)) {
rc = -ENOMEM;
dev_err(&vscsi->dev, "probe: error mapping command buffer\n"); dev_err(&vscsi->dev, "probe: error mapping command buffer\n");
goto free_buf; goto free_buf;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment