summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-23 05:09:13 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2018-01-24 15:51:07 +0300
commit310eb252a78307fc2ac4c4c755290a578c0304d0 (patch)
tree982abfab0d18ad09ae641965ad601efeb412b336 /drivers/mmc
parentf9de65fc61b51398cafb2e4db5cc787704fc49a1 (diff)
downloadlinux-310eb252a78307fc2ac4c4c755290a578c0304d0.tar.xz
mmc: mmci: fix error return code in mmci_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f9bb304ce855 ("mmc: mmci: Add support for setting pad type via pinctrl") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 6246eaada750..70b0df8b9c78 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1646,6 +1646,7 @@ static int mmci_probe(struct amba_device *dev,
host->pinctrl = devm_pinctrl_get(&dev->dev);
if (IS_ERR(host->pinctrl)) {
dev_err(&dev->dev, "failed to get pinctrl");
+ ret = PTR_ERR(host->pinctrl);
goto host_free;
}
@@ -1653,6 +1654,7 @@ static int mmci_probe(struct amba_device *dev,
PINCTRL_STATE_DEFAULT);
if (IS_ERR(host->pins_default)) {
dev_err(mmc_dev(mmc), "Can't select default pins\n");
+ ret = PTR_ERR(host->pins_default);
goto host_free;
}
@@ -1660,6 +1662,7 @@ static int mmci_probe(struct amba_device *dev,
MMCI_PINCTRL_STATE_OPENDRAIN);
if (IS_ERR(host->pins_opendrain)) {
dev_err(mmc_dev(mmc), "Can't select opendrain pins\n");
+ ret = PTR_ERR(host->pins_opendrain);
goto host_free;
}
}