From: Guido Günther Date: Wed, 21 Aug 2019 16:33:04 +0000 (+0200) Subject: soc: imx: gpcv2: Print the correct error code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=968c6f4b3c21e9fae9b49cc91214a01b4827625d;p=linux.git 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 Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo --- diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 31b8d002d8558..b0dffb06c05df 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; }