From patchwork Fri Jun 24 18:47:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 2312 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D981423F08 for ; Fri, 24 Jun 2011 18:47:40 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9B84EA18042 for ; Fri, 24 Jun 2011 18:47:40 +0000 (UTC) Received: by qyk30 with SMTP id 30so2219792qyk.11 for ; Fri, 24 Jun 2011 11:47:40 -0700 (PDT) Received: by 10.229.117.95 with SMTP id p31mr2816133qcq.97.1308941259850; Fri, 24 Jun 2011 11:47:39 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.230.139 with SMTP id jm11cs56378qcb; Fri, 24 Jun 2011 11:47:39 -0700 (PDT) Received: by 10.90.187.16 with SMTP id k16mr4000887agf.209.1308941258803; Fri, 24 Jun 2011 11:47:38 -0700 (PDT) Received: from mail-pv0-f178.google.com (mail-pv0-f178.google.com [74.125.83.178]) by mx.google.com with ESMTPS id g24si7072417anq.88.2011.06.24.11.47.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 11:47:38 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.178 is neither permitted nor denied by best guess record for domain of jaswinder.singh@linaro.org) client-ip=74.125.83.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.178 is neither permitted nor denied by best guess record for domain of jaswinder.singh@linaro.org) smtp.mail=jaswinder.singh@linaro.org Received: by pvg7 with SMTP id 7so2179750pvg.37 for ; Fri, 24 Jun 2011 11:47:37 -0700 (PDT) Received: by 10.68.66.70 with SMTP id d6mr1878129pbt.470.1308941257285; Fri, 24 Jun 2011 11:47:37 -0700 (PDT) Received: from localhost.localdomain ([122.167.86.144]) by mx.google.com with ESMTPS id g8sm2240206pba.53.2011.06.24.11.47.33 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 11:47:36 -0700 (PDT) From: Jassi Brar To: linux-usb@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, mchehab@redhat.com, gregkh@suse.de, patches@linaro.org, balbi@ti.com, Jassi Brar Subject: [PATCH] USB: Gadget: Webcam: Return correct result of bind Date: Sat, 25 Jun 2011 00:17:26 +0530 Message-Id: <1308941246-32089-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.7.4.1 The config bind was reported success even if usb_add_function failed. Fix the return value. Signed-off-by: Jassi Brar Acked-by: Laurent Pinchart --- drivers/usb/gadget/f_uvc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index be446b7..c847b9e 100644 --- a/drivers/usb/gadget/f_uvc.c +++ b/drivers/usb/gadget/f_uvc.c @@ -649,7 +649,7 @@ uvc_bind_config(struct usb_configuration *c, if (ret) kfree(uvc); - return 0; + return ret; error: kfree(uvc);