summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2020-11-21 10:14:31 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2020-11-24 12:35:34 +0100
commitd7b819b5d33869d41bdaa427aeb98ae24c57a38b (patch)
treee5f6fb7e7f3dc36ae8b24c8c20c8ddd4c9b0657c
parentc5b1c6dc13daec60405ecd31eaa5379a9f798fa8 (diff)
downloadlwn-d7b819b5d33869d41bdaa427aeb98ae24c57a38b.tar.gz
lwn-d7b819b5d33869d41bdaa427aeb98ae24c57a38b.zip
mmc: pxamci: Fix error return code in pxamci_probe
Fix to return the error code from devm_gpiod_get_optional() instaed of 0 in pxamci_probe(). Fixes: f54005b508b9a9d9c ("mmc: pxa: Use GPIO descriptor for power") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Link: https://lore.kernel.org/r/20201121021431.3168506-1-chengzhihao1@huawei.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/pxamci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 29f6180a0036..316393c694d7 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -731,6 +731,7 @@ static int pxamci_probe(struct platform_device *pdev)
host->power = devm_gpiod_get_optional(dev, "power", GPIOD_OUT_LOW);
if (IS_ERR(host->power)) {
+ ret = PTR_ERR(host->power);
dev_err(dev, "Failed requesting gpio_power\n");
goto out;
}