media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR
Fabio Estevam
reviewerPATCH v2 1/1 media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR
From: From: Gustavo A. R. Silva <[email protected]>
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.
---
Changes since v1:
- Rebased against 4.17-rc1
drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-csi.c +1 -1
@@ -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 )
Signature · 1 line
2.7.4
Fabio Estevam
reviewerHi Hans,
Unfortunately this one missed to be applied into 4.17-rc and now the imx-media-csi driver does not probe.
Please consider applying it for 4.17-rc3 to avoid the regression.
Thanks
Quoted 35 lines · Fabio Estevam
From: From: Gustavo A. R. Silva <[email protected]>
Fix inconsistent
IS_ERRandPTR_ERRinimx_csi_probe. The proper pointer to be passed as argument is pinctrl instead ofpriv->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 <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Acked-by Philipp Zabel <[email protected]>---
Changes since v1:
- Rebased against 4.17-rc1drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/imx/imx-media-csi.c +1
-2@@ -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 ) --2.7.4
Quoted 22 lines · Fabio Estevam
Hi Hans,
Unfortunately this one missed to be applied into 4.17-rc and now the imx-media-csi driver does not probe.
Please consider applying it for 4.17-rc3 to avoid the regression.
Thanks
Quoted 12 lines · Fabio Estevam
From: From: Gustavo A. R. Silva <[email protected]>
Fix inconsistent
IS_ERRandPTR_ERRinimx_csi_probe. The proper pointer to be passed as argument is pinctrl instead ofpriv->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 <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Acked-by Philipp Zabel <[email protected]>
regards
Philipp