From patchwork Tue May 7 11:48:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2532861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 1845BDF215 for ; Tue, 7 May 2013 11:48:58 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZgO3-0003ZF-Sj; Tue, 07 May 2013 11:48:52 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZgO1-0001EU-2K; Tue, 07 May 2013 11:48:49 +0000 Received: from mail-bk0-x233.google.com ([2a00:1450:4008:c01::233]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZgNx-0001DJ-0f for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2013 11:48:47 +0000 Received: by mail-bk0-f51.google.com with SMTP id ji2so234496bkc.24 for ; Tue, 07 May 2013 04:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=juB1baYIggU/T4ez06q2yrU6Sm5+FZuMoceyJ8LhKAk=; b=Mp+48puk4eFc3EIDvMveSPZzCU6zJ/WE1CLotGAjb0D8jHaT76+NGBhivCacRCDPUw FZL3hDeLtT68ic90As7RmLg9uHPmgZ618dnDtGG51SAmOga2kY9v4K5+UKtQDNIKwUSk /Y+F+I3C2juqtBfLA9Zam+/aawGH0Ep0eywni3vNfCS0GRcaJ4Xc31ZFqb/ZI5haYzwh aEVf4nxrboXb8RLm5bPSdjMJvCt0Rn5hKCes/VSbABxYY7SygzrDSRNDMum4iBh8HvGa EhYukQHRpSfRjrvVvx6fypAVSRm9SEHWpFDHtlTk66gvbjWv94cYyDLpCU9V1Wjo8N4L ZnEg== MIME-Version: 1.0 X-Received: by 10.205.38.3 with SMTP id tg3mr463512bkb.66.1367927302218; Tue, 07 May 2013 04:48:22 -0700 (PDT) Received: by 10.204.199.129 with HTTP; Tue, 7 May 2013 04:48:22 -0700 (PDT) Date: Tue, 7 May 2013 19:48:22 +0800 Message-ID: Subject: [PATCH] usb: gadget: s3c2410_udc: fix error return code in s3c2410_udc_probe() From: Wei Yongjun To: ben-linux@fluff.org, kgene.kim@samsung.com, balbi@ti.com, gregkh@linuxfoundation.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130507_074845_185928_023B4464 X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: yongjun_wei@trendmicro.com.cn, linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Wei Yongjun Fix to return a negative error code in the gpio_to_irq() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Jingoo Han --- drivers/usb/gadget/s3c2410_udc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index d0e75e1..c974776 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -1851,6 +1851,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev) irq = gpio_to_irq(udc_info->vbus_pin); if (irq < 0) { dev_err(dev, "no irq for gpio vbus pin\n"); + retval = irq; goto err_gpio_claim; }