Commit 465ff28d authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

staging: vme: fix error return code in vme_user_probe()

Fix to return -ENOMEM in the resource alloc error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 70d52bce
...@@ -734,6 +734,7 @@ static int vme_user_probe(struct vme_dev *vdev) ...@@ -734,6 +734,7 @@ static int vme_user_probe(struct vme_dev *vdev)
if (image[i].resource == NULL) { if (image[i].resource == NULL) {
dev_warn(&vdev->dev, dev_warn(&vdev->dev,
"Unable to allocate slave resource\n"); "Unable to allocate slave resource\n");
err = -ENOMEM;
goto err_slave; goto err_slave;
} }
image[i].size_buf = PCI_BUF_SIZE; image[i].size_buf = PCI_BUF_SIZE;
...@@ -760,6 +761,7 @@ static int vme_user_probe(struct vme_dev *vdev) ...@@ -760,6 +761,7 @@ static int vme_user_probe(struct vme_dev *vdev)
if (image[i].resource == NULL) { if (image[i].resource == NULL) {
dev_warn(&vdev->dev, dev_warn(&vdev->dev,
"Unable to allocate master resource\n"); "Unable to allocate master resource\n");
err = -ENOMEM;
goto err_master; goto err_master;
} }
image[i].size_buf = PCI_BUF_SIZE; image[i].size_buf = PCI_BUF_SIZE;
......
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