summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-19 13:17:53 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-24 15:51:00 +0200
commit1305f2b2f52af5986f44dfbb1a6fe58ae875aa61 (patch)
treec608d044988da35c40123a7779d83a4108841ae8 /drivers/staging
parent25633d1f5dd7ea35c77aae12c039a80e46abec01 (diff)
greybus: es2: fix error return code in ap_probe()
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> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/greybus/es2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index 071bb1cfd3ae..baab460eeaa3 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -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);