summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vme/devices
diff options
context:
space:
mode:
authorWei Yongjun2013-05-13 08:05:38 +0200
committerGreg Kroah-Hartman2013-05-13 23:34:22 +0200
commit465ff28db720d99d885ee9cd70af487745ea4a5a (patch)
tree23ca99a875291533687878808dc62203510cb589 /drivers/staging/vme/devices
parentstaging: comedi: ni_labpc: remove range_labpc_1200_ai export (diff)
downloadkernel-qcow2-linux-465ff28db720d99d885ee9cd70af487745ea4a5a.tar.gz
kernel-qcow2-linux-465ff28db720d99d885ee9cd70af487745ea4a5a.tar.xz
kernel-qcow2-linux-465ff28db720d99d885ee9cd70af487745ea4a5a.zip
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vme/devices')
-rw-r--r--drivers/staging/vme/devices/vme_user.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index cf2148e8e5c4..daec15565a43 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -734,6 +734,7 @@ static int vme_user_probe(struct vme_dev *vdev)
if (image[i].resource == NULL) {
dev_warn(&vdev->dev,
"Unable to allocate slave resource\n");
+ err = -ENOMEM;
goto err_slave;
}
image[i].size_buf = PCI_BUF_SIZE;
@@ -760,6 +761,7 @@ static int vme_user_probe(struct vme_dev *vdev)
if (image[i].resource == NULL) {
dev_warn(&vdev->dev,
"Unable to allocate master resource\n");
+ err = -ENOMEM;
goto err_master;
}
image[i].size_buf = PCI_BUF_SIZE;