Skip to content

Commit 48bbf63

Browse files
GustavoARSilvachanwoochoi
authored andcommitted
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: 16c1d2f ("PM / devfreq: imx: Register interconnect device") Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Dong Aisheng <[email protected]> [cw00.choi: Edit the patch title from 'imx' to 'imx-bus'] Signed-off-by: Chanwoo Choi <[email protected]>
1 parent a316b5c commit 48bbf63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/devfreq/imx-bus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev)
8888
dev, icc_driver_name, -1, NULL, 0);
8989
if (IS_ERR(priv->icc_pdev)) {
9090
dev_err(dev, "failed to register icc provider %s: %ld\n",
91-
icc_driver_name, PTR_ERR(priv->devfreq));
92-
return PTR_ERR(priv->devfreq);
91+
icc_driver_name, PTR_ERR(priv->icc_pdev));
92+
return PTR_ERR(priv->icc_pdev);
9393
}
9494

9595
return 0;

0 commit comments

Comments
 (0)