mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 10:01:43 +00:00
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>
This commit is contained in:
parent
8475c81185
commit
38247feb60
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user