2018-09-04 03:00:59

by Yue Haibing

[permalink] [raw]
Subject: [PATCH] mmc: tegra: fix inconsistent IS_ERR and PTR_ERR

Fix inconsistent IS_ERR and PTR_ERR in tegra_sdhci_init_pinctrl_info,
the proper pointer to be passed as argument is 'pinctrl_state_1v8'

Signed-off-by: YueHaibing <[email protected]>
---
drivers/mmc/host/sdhci-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index e80716c..c789158 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -724,7 +724,7 @@ static int tegra_sdhci_init_pinctrl_info(struct device *dev,
pinctrl_lookup_state(tegra_host->pinctrl_sdmmc, "sdmmc-1v8");
if (IS_ERR(tegra_host->pinctrl_state_1v8)) {
dev_warn(dev, "Missing 1.8V pad state, err: %ld\n",
- PTR_ERR(tegra_host->pinctrl_state_3v3));
+ PTR_ERR(tegra_host->pinctrl_state_1v8));
return -1;
}

--
2.7.0




2018-09-04 10:14:51

by Aapo Vienamo

[permalink] [raw]
Subject: Re: [PATCH] mmc: tegra: fix inconsistent IS_ERR and PTR_ERR

On Tue, 4 Sep 2018 10:59:09 +0800
YueHaibing <[email protected]> wrote:

> Fix inconsistent IS_ERR and PTR_ERR in tegra_sdhci_init_pinctrl_info,
> the proper pointer to be passed as argument is 'pinctrl_state_1v8'
>
> Signed-off-by: YueHaibing <[email protected]>

Reviewed-by: Aapo Vienamo <[email protected]>

> ---
> drivers/mmc/host/sdhci-tegra.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index e80716c..c789158 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -724,7 +724,7 @@ static int tegra_sdhci_init_pinctrl_info(struct device *dev,
> pinctrl_lookup_state(tegra_host->pinctrl_sdmmc, "sdmmc-1v8");
> if (IS_ERR(tegra_host->pinctrl_state_1v8)) {
> dev_warn(dev, "Missing 1.8V pad state, err: %ld\n",
> - PTR_ERR(tegra_host->pinctrl_state_3v3));
> + PTR_ERR(tegra_host->pinctrl_state_1v8));
> return -1;
> }
>


2018-09-04 14:36:14

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH] mmc: tegra: fix inconsistent IS_ERR and PTR_ERR

On 4 September 2018 at 04:59, YueHaibing <[email protected]> wrote:
> Fix inconsistent IS_ERR and PTR_ERR in tegra_sdhci_init_pinctrl_info,
> the proper pointer to be passed as argument is 'pinctrl_state_1v8'
>
> Signed-off-by: YueHaibing <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> drivers/mmc/host/sdhci-tegra.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index e80716c..c789158 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -724,7 +724,7 @@ static int tegra_sdhci_init_pinctrl_info(struct device *dev,
> pinctrl_lookup_state(tegra_host->pinctrl_sdmmc, "sdmmc-1v8");
> if (IS_ERR(tegra_host->pinctrl_state_1v8)) {
> dev_warn(dev, "Missing 1.8V pad state, err: %ld\n",
> - PTR_ERR(tegra_host->pinctrl_state_3v3));
> + PTR_ERR(tegra_host->pinctrl_state_1v8));
> return -1;
> }
>
> --
> 2.7.0
>
>