Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942034AbcJSOYo (ORCPT ); Wed, 19 Oct 2016 10:24:44 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33716 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941779AbcJSOYd (ORCPT ); Wed, 19 Oct 2016 10:24:33 -0400 From: Wei Yongjun To: Johan Hovold , Alex Elder , Alexandre Bailon , Greg Kroah-Hartman Cc: Wei Yongjun , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH -next] greybus: es2: fix error return code in ap_probe() Date: Wed, 19 Oct 2016 13:17:53 +0000 Message-Id: <1476883073-11370-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 852 Lines: 26 From: Wei Yongjun 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 --- 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);