diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-29 16:17:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:28:13 -0700 |
commit | 3119b487e03650b51589a86aac33098b7cc2a09e (patch) | |
tree | e7dda500b7204f07111c8890b57d6d4a0c6b668b | |
parent | ca0dde97178e75ed1370b8616326f5496a803d65 (diff) | |
download | linux-stable-3119b487e03650b51589a86aac33098b7cc2a09e.tar.gz linux-stable-3119b487e03650b51589a86aac33098b7cc2a09e.tar.bz2 linux-stable-3119b487e03650b51589a86aac33098b7cc2a09e.zip |
drivers/rpmsg/virtio_rpmsg_bus.c: fix error return code in rpmsg_probe()
Return a negative error code from the error handling case instead of 0, as
returned elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index a59684b5fc68..7861f1119b7d 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -951,8 +951,10 @@ static int rpmsg_probe(struct virtio_device *vdev) bufs_va = dma_alloc_coherent(vdev->dev.parent->parent, RPMSG_TOTAL_BUF_SPACE, &vrp->bufs_dma, GFP_KERNEL); - if (!bufs_va) + if (!bufs_va) { + err = -ENOMEM; goto vqs_del; + } dev_dbg(&vdev->dev, "buffers: va %p, dma 0x%llx\n", bufs_va, (unsigned long long)vrp->bufs_dma); |