summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq/imx-bus.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2020-05-07 15:12:45 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2020-05-28 11:02:40 +0200
commit48bbf6375131155d329eb8e06ae962e27cbba032 (patch)
tree70c07e260d0bf280b7526192db5f9d0ccc113ead /drivers/devfreq/imx-bus.c
parentPM / devfreq: Replace strncpy with strscpy (diff)
downloadlinux-48bbf6375131155d329eb8e06ae962e27cbba032.tar.xz
linux-48bbf6375131155d329eb8e06ae962e27cbba032.zip
PM / devfreq: imx-bus: Fix inconsistent IS_ERR and PTR_ERR
Fix inconsistent IS_ERR and PTR_ERR in imx_bus_init_icc(). The proper pointer to be passed as argument to PTR_ERR() is priv->icc_pdev. This bug was detected with the help of Coccinelle. Fixes: 16c1d2f1b0bd ("PM / devfreq: imx: Register interconnect device") Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> [cw00.choi: Edit the patch title from 'imx' to 'imx-bus'] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq/imx-bus.c')
-rw-r--r--drivers/devfreq/imx-bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c
index 532e7954032f..4f38455ad742 100644
--- a/drivers/devfreq/imx-bus.c
+++ b/drivers/devfreq/imx-bus.c
@@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev)
dev, icc_driver_name, -1, NULL, 0);
if (IS_ERR(priv->icc_pdev)) {
dev_err(dev, "failed to register icc provider %s: %ld\n",
- icc_driver_name, PTR_ERR(priv->devfreq));
- return PTR_ERR(priv->devfreq);
+ icc_driver_name, PTR_ERR(priv->icc_pdev));
+ return PTR_ERR(priv->icc_pdev);
}
return 0;