Skip to content

Commit

Permalink
greybus: es2: fix error return code in ap_probe()
Browse files Browse the repository at this point in the history
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: 9d9d377 ("greybus: es2: Add a new bulk in endpoint for APBridgeA RPC")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Oct 24, 2016
1 parent 25633d1 commit 1305f2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/greybus/es2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,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);
Expand Down

0 comments on commit 1305f2b

Please sign in to comment.