diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-13 14:05:38 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-13 17:34:22 -0400 |
commit | 465ff28db720d99d885ee9cd70af487745ea4a5a (patch) | |
tree | 23ca99a875291533687878808dc62203510cb589 /drivers | |
parent | 70d52bce5523f2c6a7bf3f9a54dacc0be112a3e8 (diff) |
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')
-rw-r--r-- | drivers/staging/vme/devices/vme_user.c | 2 |
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 cf2148e8e5c..daec15565a4 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; |