From patchwork Tue May 28 05:26:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2622941 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9367940077 for ; Tue, 28 May 2013 05:26:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932464Ab3E1F01 (ORCPT ); Tue, 28 May 2013 01:26:27 -0400 Received: from mail-bk0-f53.google.com ([209.85.214.53]:64514 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932458Ab3E1F00 (ORCPT ); Tue, 28 May 2013 01:26:26 -0400 Received: by mail-bk0-f53.google.com with SMTP id mx1so3929629bkb.40 for ; Mon, 27 May 2013 22:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=TWuM9WPmuBIIcWjrgOht5vgrgDWU70puWCjnGPJb1TM=; b=fYCR2Ms9J1xrr221ElkDveIo1YbCkgGqvfPIqqxjt7fZ73kDSC0EIuX6MI3cyYWFiX AzmeTSI0+HD1aIyOjieyiNSYNcGdCnxEMC6iuIhVd3K4n7cI9gzBXbu7PzqE1peQ6Tzq RsBgHKpAv3deDO3KlnMKUJ2RftlUQYris94U2UgKCmIG00UVU8cMSB5y/sDJvuxwqVXO sg5cobpK48PamzzfWgBxmUTvUT4nThwx5C0g3swfR/O9jCzzzor/Hm/egm6g2qYnxaCj eeu6j5vbFQg0+k96ntvTEXTw7j8DhnTHHYTYPTAIKnDUMFiIusGmryLazhNIEbNs8K2d m9aQ== MIME-Version: 1.0 X-Received: by 10.205.25.137 with SMTP id ri9mr3578820bkb.151.1369718785301; Mon, 27 May 2013 22:26:25 -0700 (PDT) Received: by 10.204.39.1 with HTTP; Mon, 27 May 2013 22:26:25 -0700 (PDT) Date: Tue, 28 May 2013 13:26:25 +0800 Message-ID: Subject: [PATCH] mmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd() From: Wei Yongjun To: cjb@laptop.org, adrian.hunter@intel.com, rafael.j.wysocki@intel.com, jg1.han@samsung.com, sonic.zhang@analog.com Cc: yongjun_wei@trendmicro.com.cn, linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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 Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index a51e603..08a85ec 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -189,8 +189,10 @@ static int sdhci_acpi_add_own_cd(struct device *dev, int gpio, goto out; irq = gpio_to_irq(gpio); - if (irq < 0) + if (irq < 0) { + err = irq; goto out_free; + } flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING; err = devm_request_irq(dev, irq, sdhci_acpi_sd_cd, flags, "sd_cd", mmc);