提交 48bbf637 编写于 作者: G Gustavo A. R. Silva 提交者: Chanwoo Choi

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: NGustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: NDong Aisheng <aisheng.dong@nxp.com>
[cw00.choi: Edit the patch title from 'imx' to 'imx-bus']
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
上级 a316b5ca
...@@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev) ...@@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev)
dev, icc_driver_name, -1, NULL, 0); dev, icc_driver_name, -1, NULL, 0);
if (IS_ERR(priv->icc_pdev)) { if (IS_ERR(priv->icc_pdev)) {
dev_err(dev, "failed to register icc provider %s: %ld\n", dev_err(dev, "failed to register icc provider %s: %ld\n",
icc_driver_name, PTR_ERR(priv->devfreq)); icc_driver_name, PTR_ERR(priv->icc_pdev));
return PTR_ERR(priv->devfreq); return PTR_ERR(priv->icc_pdev);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册