* [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool()
@ 2013-03-22 13:16 Wei Yongjun
2013-03-22 14:02 ` Sjur BRENDELAND
2013-03-22 14:24 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Wei Yongjun @ 2013-03-22 13:16 UTC (permalink / raw)
To: sjur.brandeland, rusty; +Cc: yongjun_wei, netdev
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/net/caif/caif_virtio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index f6caa1e..43b1b75 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -424,8 +424,10 @@ static int cfv_create_genpool(struct cfv_info *cfv)
cfv->reserved_size = num_possible_cpus() * cfv->ndev->mtu;
cfv->reserved_mem = gen_pool_alloc(cfv->genpool,
cfv->reserved_size);
- if (!cfv->reserved_mem)
+ if (!cfv->reserved_mem) {
+ err = -ENOMEM;
goto err;
+ }
cfv->watermark_tx = virtqueue_get_vring_size(cfv->vq_tx);
return 0;
^ permalink raw reply related [flat|nested] 5+ messages in thread* RE: [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool()
2013-03-22 13:16 [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool() Wei Yongjun
@ 2013-03-22 14:02 ` Sjur BRENDELAND
2013-03-22 14:24 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: Sjur BRENDELAND @ 2013-03-22 14:02 UTC (permalink / raw)
To: Wei Yongjun, rusty@rustcorp•com.au
Cc: yongjun_wei@trendmicro•com.cn, netdev@vger•kernel.org
> 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>
Yes, this looks good to me,
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson•com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool()
2013-03-22 13:16 [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool() Wei Yongjun
2013-03-22 14:02 ` Sjur BRENDELAND
@ 2013-03-22 14:24 ` David Miller
2013-03-22 14:27 ` Sjur BRENDELAND
1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2013-03-22 14:24 UTC (permalink / raw)
To: weiyj.lk; +Cc: sjur.brandeland, rusty, yongjun_wei, netdev
From: Wei Yongjun <weiyj.lk@gmail•com>
Date: Fri, 22 Mar 2013 21:16:52 +0800
> 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/net/caif/caif_virtio.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
I can't apply this as this file doesn't exist in my tree.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool()
2013-03-22 14:24 ` David Miller
@ 2013-03-22 14:27 ` Sjur BRENDELAND
2013-03-25 10:13 ` Rusty Russell
0 siblings, 1 reply; 5+ messages in thread
From: Sjur BRENDELAND @ 2013-03-22 14:27 UTC (permalink / raw)
To: David Miller, weiyj.lk@gmail•com
Cc: rusty@rustcorp•com.au, yongjun_wei@trendmicro•com.cn,
netdev@vger•kernel.org
> From: David Miller [mailto:davem@davemloft•net]
> > 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/net/caif/caif_virtio.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
>
> I can't apply this as this file doesn't exist in my tree.
caif_virtio.c lives in Rusty's "virtio-next" tree.
I guess this patch should have been tagged "virtio-next" instead.
Thanks,
Sjur
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool()
2013-03-22 14:27 ` Sjur BRENDELAND
@ 2013-03-25 10:13 ` Rusty Russell
0 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2013-03-25 10:13 UTC (permalink / raw)
To: Sjur BRENDELAND, David Miller, weiyj.lk@gmail•com
Cc: yongjun_wei@trendmicro•com.cn, netdev@vger•kernel.org
Sjur BRENDELAND <sjur.brandeland@stericsson•com> writes:
>> From: David Miller [mailto:davem@davemloft•net]
>> > 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/net/caif/caif_virtio.c | 4 +++-
>> > 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> I can't apply this as this file doesn't exist in my tree.
>
> caif_virtio.c lives in Rusty's "virtio-next" tree.
> I guess this patch should have been tagged "virtio-next" instead.
Thanks, I've applied this.
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-25 23:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 13:16 [PATCH -next] caif_virtio: fix error return code in cfv_create_genpool() Wei Yongjun
2013-03-22 14:02 ` Sjur BRENDELAND
2013-03-22 14:24 ` David Miller
2013-03-22 14:27 ` Sjur BRENDELAND
2013-03-25 10:13 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox