Skip to content

Commit

Permalink
PM / devfreq: imx-bus: Fix inconsistent IS_ERR and PTR_ERR
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Gustavo A. R. Silva authored and Chanwoo Choi committed May 28, 2020
1 parent a316b5c commit 48bbf63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/devfreq/imx-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 48bbf63

Please sign in to comment.