diff mbox series

mmc: pxamci: Fix error return code in pxamci_probe

Message ID 20201121021431.3168506-1-chengzhihao1@huawei.com
State New
Headers show
Series mmc: pxamci: Fix error return code in pxamci_probe | expand

Commit Message

Zhihao Cheng Nov. 21, 2020, 2:14 a.m. UTC
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>
---
 drivers/mmc/host/pxamci.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ulf Hansson Nov. 24, 2020, 2:25 p.m. UTC | #1
On Sat, 21 Nov 2020 at 03:11, Zhihao Cheng <chengzhihao1@huawei.com> wrote:
>

> 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>


Applied for next, thanks!

Kind regards
Uffe


> ---

>  drivers/mmc/host/pxamci.c | 1 +

>  1 file changed, 1 insertion(+)

>

> 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;

>                 }

> --

> 2.25.4

>
diff mbox series

Patch

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;
 		}