Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1503664 > unrolled thread
| Started by | Wei Yongjun <weiyj.lk@gmail.com> |
|---|---|
| First post | 2016-10-19 16:30 +0200 |
| Last post | 2016-10-19 18:00 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH -next] greybus: es2: fix error return code in ap_probe() Wei Yongjun <weiyj.lk@gmail.com> - 2016-10-19 16:30 +0200
Re: [PATCH -next] greybus: es2: fix error return code in ap_probe() Johan Hovold <johan@kernel.org> - 2016-10-19 17:50 +0200
Re: [PATCH -next] greybus: es2: fix error return code in ap_probe() Viresh Kumar <viresh.kumar@linaro.org> - 2016-10-19 18:00 +0200
| From | Wei Yongjun <weiyj.lk@gmail.com> |
|---|---|
| Date | 2016-10-19 16:30 +0200 |
| Subject | [PATCH -next] greybus: es2: fix error return code in ap_probe() |
| Message-ID | <su02u-2rf-57@gated-at.bofh.it> |
From: Wei Yongjun <weiyongjun1@huawei.com>
Fix to return a negative error code from the es2_arpc_in_enable() error
handling case instead of 0, as done elsewhere in this function.
Fixes: 9d9d3777a9db ("greybus: es2: Add a new bulk in endpoint for
APBridgeA RPC")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/staging/greybus/es2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index 8eabc71..a97fccf 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -1547,7 +1547,8 @@ static int ap_probe(struct usb_interface *interface,
INIT_LIST_HEAD(&es2->arpcs);
spin_lock_init(&es2->arpc_lock);
- if (es2_arpc_in_enable(es2))
+ retval = es2_arpc_in_enable(es2);
+ if (retval)
goto error;
retval = gb_hd_add(hd);
[toc] | [next] | [standalone]
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Date | 2016-10-19 17:50 +0200 |
| Message-ID | <su1hU-3b7-19@gated-at.bofh.it> |
| In reply to | #1503664 |
On Wed, Oct 19, 2016 at 01:17:53PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fix to return a negative error code from the es2_arpc_in_enable() error
> handling case instead of 0, as done elsewhere in this function.
>
> Fixes: 9d9d3777a9db ("greybus: es2: Add a new bulk in endpoint for
> APBridgeA RPC")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Thanks for the fix. This was clearly broken and would have led to
havoc on disconnect as well.
Reviewed-by: Johan Hovold <johan@kernel.org>
Thanks,
Johan
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-10-19 18:00 +0200 |
| Message-ID | <su1rB-3fC-89@gated-at.bofh.it> |
| In reply to | #1503664 |
On Wed, Oct 19, 2016 at 6:47 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fix to return a negative error code from the es2_arpc_in_enable() error
> handling case instead of 0, as done elsewhere in this function.
>
> Fixes: 9d9d3777a9db ("greybus: es2: Add a new bulk in endpoint for
> APBridgeA RPC")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/staging/greybus/es2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
> index 8eabc71..a97fccf 100644
> --- a/drivers/staging/greybus/es2.c
> +++ b/drivers/staging/greybus/es2.c
> @@ -1547,7 +1547,8 @@ static int ap_probe(struct usb_interface *interface,
> INIT_LIST_HEAD(&es2->arpcs);
> spin_lock_init(&es2->arpc_lock);
>
> - if (es2_arpc_in_enable(es2))
> + retval = es2_arpc_in_enable(es2);
> + if (retval)
> goto error;
>
> retval = gb_hd_add(hd);
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web