public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] rpmsg: fix error return code in rpmsg_probe()
@ 2013-03-22 13:16 Wei Yongjun
  2013-03-25 10:11 ` Rusty Russell
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-03-22 13:16 UTC (permalink / raw)
  To: ohad, akpm, rusty, tj, sboyd; +Cc: yongjun_wei, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to 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>
---
 drivers/rpmsg/virtio_rpmsg_bus.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 33d827b..56fceaf 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);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] rpmsg: fix error return code in rpmsg_probe()
  2013-03-22 13:16 [PATCH -next] rpmsg: fix error return code in rpmsg_probe() Wei Yongjun
@ 2013-03-25 10:11 ` Rusty Russell
  2013-03-26 12:25   ` Ohad Ben-Cohen
  0 siblings, 1 reply; 3+ messages in thread
From: Rusty Russell @ 2013-03-25 10:11 UTC (permalink / raw)
  To: Wei Yongjun, ohad, akpm, tj, sboyd; +Cc: yongjun_wei, linux-kernel

Wei Yongjun <weiyj.lk@gmail.com> writes:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to 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>

Thanks, I've taken this for the moment in my pending queue.

Which brings the questionL Ohad, did you want to keep pushing your own
tree or want to send rpmsg stuff via my virtio-next tree?

Cheers,
Rusty.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] rpmsg: fix error return code in rpmsg_probe()
  2013-03-25 10:11 ` Rusty Russell
@ 2013-03-26 12:25   ` Ohad Ben-Cohen
  0 siblings, 0 replies; 3+ messages in thread
From: Ohad Ben-Cohen @ 2013-03-26 12:25 UTC (permalink / raw)
  To: Rusty Russell
  Cc: Wei Yongjun, akpm@linux-foundation.org, Tejun Heo, Stephen Boyd,
	Wei Yongjun, linux-kernel@vger.kernel.org

On Mon, Mar 25, 2013 at 12:11 PM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> Wei Yongjun <weiyj.lk@gmail.com> writes:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> Fix to 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>
>
> Thanks, I've taken this for the moment in my pending queue.

Please note that akpm already picked this up via the -mm tree very
promptly after Wei submitted this.

> Which brings the questionL Ohad, did you want to keep pushing your own
> tree or want to send rpmsg stuff via my virtio-next tree?

I'm thinking I'll keep pushing my tree for now but I'm taking this as an
open offer from you :)

Thanks,
Ohad.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-26 12:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 13:16 [PATCH -next] rpmsg: fix error return code in rpmsg_probe() Wei Yongjun
2013-03-25 10:11 ` Rusty Russell
2013-03-26 12:25   ` Ohad Ben-Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox