aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrom: Gustavo A. R. Silva <gustavo@embeddedor.com>2018-04-16 17:28:56 (GMT)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-04-23 17:42:28 (GMT)
commitf017ca642e8a69f543bf16bbf3964ad07aa2ec72 (patch)
tree3671e18f40353ccb3b087705ba553306304317a2
parent536f0f55384cfcc25d1f8f3cfd4a44048dca3b46 (diff)
media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERRold/cs_f017ca642e8a
Fix inconsistent IS_ERR and PTR_ERR in imx_csi_probe. The proper pointer to be passed as argument is pinctrl instead of priv->vdev. This issue was detected with the help of Coccinelle. Fixes: 52e17089d185 ("media: imx: Don't initialize vars that won't be used") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/staging/media/imx/imx-media-csi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 16cab40..aeab05f 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -1799,7 +1799,7 @@ static int imx_csi_probe(struct platform_device *pdev)
priv->dev->of_node = pdata->of_node;
pinctrl = devm_pinctrl_get_select_default(priv->dev);
if (IS_ERR(pinctrl)) {
- ret = PTR_ERR(priv->vdev);
+ ret = PTR_ERR(pinctrl);
dev_dbg(priv->dev,
"devm_pinctrl_get_select_default() failed: %d\n", ret);
if (ret != -ENODEV)

Privacy Policy