Commit 310eb252 authored by Wei Yongjun's avatar Wei Yongjun Committed by Ulf Hansson

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: f9bb304c ("mmc: mmci: Add support for setting pad type via pinctrl")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent f9de65fc
...@@ -1646,6 +1646,7 @@ static int mmci_probe(struct amba_device *dev, ...@@ -1646,6 +1646,7 @@ static int mmci_probe(struct amba_device *dev,
host->pinctrl = devm_pinctrl_get(&dev->dev); host->pinctrl = devm_pinctrl_get(&dev->dev);
if (IS_ERR(host->pinctrl)) { if (IS_ERR(host->pinctrl)) {
dev_err(&dev->dev, "failed to get pinctrl"); dev_err(&dev->dev, "failed to get pinctrl");
ret = PTR_ERR(host->pinctrl);
goto host_free; goto host_free;
} }
...@@ -1653,6 +1654,7 @@ static int mmci_probe(struct amba_device *dev, ...@@ -1653,6 +1654,7 @@ static int mmci_probe(struct amba_device *dev,
PINCTRL_STATE_DEFAULT); PINCTRL_STATE_DEFAULT);
if (IS_ERR(host->pins_default)) { if (IS_ERR(host->pins_default)) {
dev_err(mmc_dev(mmc), "Can't select default pins\n"); dev_err(mmc_dev(mmc), "Can't select default pins\n");
ret = PTR_ERR(host->pins_default);
goto host_free; goto host_free;
} }
...@@ -1660,6 +1662,7 @@ static int mmci_probe(struct amba_device *dev, ...@@ -1660,6 +1662,7 @@ static int mmci_probe(struct amba_device *dev,
MMCI_PINCTRL_STATE_OPENDRAIN); MMCI_PINCTRL_STATE_OPENDRAIN);
if (IS_ERR(host->pins_opendrain)) { if (IS_ERR(host->pins_opendrain)) {
dev_err(mmc_dev(mmc), "Can't select opendrain pins\n"); dev_err(mmc_dev(mmc), "Can't select opendrain pins\n");
ret = PTR_ERR(host->pins_opendrain);
goto host_free; goto host_free;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment