2019-08-21 16:34:54

by Guido Günther

[permalink] [raw]
Subject: [PATCH] soc: imx: gpcv2: Print the correct error code

The current code prints 'ret' (thus 0) while it should use 'err'.

Signed-off-by: Guido Günther <[email protected]>
---
drivers/soc/imx/gpcv2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 31b8d002d855..b0dffb06c05d 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -198,7 +198,7 @@ static int imx_gpc_pu_pgc_sw_pxx_req(struct generic_pm_domain *genpd,
err = regulator_disable(domain->regulator);
if (err)
dev_err(domain->dev,
- "failed to disable regulator: %d\n", ret);
+ "failed to disable regulator: %d\n", err);
/* Preserve earlier error code */
ret = ret ?: err;
}
--
2.20.1


2019-08-22 09:36:36

by Daniel Baluta

[permalink] [raw]
Subject: Re: [PATCH] soc: imx: gpcv2: Print the correct error code

On Wed, 2019-08-21 at 18:33 +0200, Guido Günther wrote:
> The current code prints 'ret' (thus 0) while it should use 'err'.
>
> Signed-off-by: Guido Günther <[email protected]>

Reviewed-by: Daniel Baluta <[email protected]>

> ---
> drivers/soc/imx/gpcv2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index 31b8d002d855..b0dffb06c05d 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -198,7 +198,7 @@ static int imx_gpc_pu_pgc_sw_pxx_req(struct
> generic_pm_domain *genpd,
> err = regulator_disable(domain->regulator);
> if (err)
> dev_err(domain->dev,
> - "failed to disable regulator: %d\n",
> ret);
> + "failed to disable regulator: %d\n",
> err);
> /* Preserve earlier error code */
> ret = ret ?: err;
> }

2019-08-24 20:43:02

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH] soc: imx: gpcv2: Print the correct error code

On Wed, Aug 21, 2019 at 06:33:04PM +0200, Guido G?nther wrote:
> The current code prints 'ret' (thus 0) while it should use 'err'.
>
> Signed-off-by: Guido G?nther <[email protected]>

Applied, thanks.