提交 5a0e8074 编写于 作者: W Wei Yongjun 提交者: Chris Ball

mmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd()

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: NJingoo Han <jg1.han@samsung.com>
Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 3f7eec62
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册