media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR
Fabio Estevam
reviewerPATCH v3 1/2 media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR
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 v2:
- None
Changes since v1:
- None
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
@@ -1798,7 +1798,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); goto free; }
Signature · 1 line
2.7.4
Fabio Estevam
reviewerPATCH v3 2/2 media: imx-media-csi: Do not propagate the error when pinctrl is not found
From: Fabio Estevam <[email protected]>
Since commit 52e17089d185 ("media: imx: Don't initialize vars that won't be used") imx_csi_probe() fails to probe after propagating the devm_pinctrl_get_select_default() error.
devm_pinctrl_get_select_default() may return -ENODEV when the CSI pinctrl entry is not found, so better not to propagate the error in the -ENODEV case to avoid a regression.
---
Changes since v2:
- Remove extraneous 'drivers/staging/media/imx/imx-media-csi.c' in commit log Changes since v1:
- Add \n to the dbg message
drivers/staging/media/imx/imx-media-csi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-csi.c +4 -1
@@ -1799,7 +1799,10 @@ static int imx_csi_probe(struct platform_device *pdev) pinctrl =devm_pinctrl_get_select_default (priv->dev);if (IS_ERR (pinctrl)) { ret =PTR_ERR (pinctrl); - goto free; +dev_dbg (priv->dev, +"devm_pinctrl_get_select_default() failed: %d\n" , ret); +if (ret != -ENODEV ) + goto free; } ret =v4l2_async_register_subdev (&priv->sd);
Signature · 1 line
2.7.4
Fabio Estevam
reviewerRe: [PATCH v3 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found
Hi,
Quoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Since commit
52e17089d185("media: imx: Don't initialize vars that won't be used")imx_csi_probe()fails to probe after propagating thedevm_pinctrl_get_select_default()error.
Quoted 7 lines
devm_pinctrl_get_select_default()may return-ENODEVwhen the CSI pinctrl entry is not found, so better not to propagate the error in the-ENODEVcase to avoid a regression.Suggested-by Philipp Zabel <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Steve Longerbeam <[email protected]>
A gentle ping.
This series fixes a regression on the imx-media-csi driver.
Thanks
Fabio Estevam
reviewerRe: [PATCH v3 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found
Hi Mauro and Hans,
Quoted 13 lines · Fabio Estevam
Hi,
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Since commit
52e17089d185("media: imx: Don't initialize vars that won't be used")imx_csi_probe()fails to probe after propagating thedevm_pinctrl_get_select_default()error.
devm_pinctrl_get_select_default()may return-ENODEVwhen the CSI pinctrl entry is not found, so better not to propagate the error in the-ENODEVcase to avoid a regression.
Quoted 7 lines
Quoted 3 lines
Suggested-by Philipp Zabel <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Steve Longerbeam <[email protected]>A gentle ping.
This series fixes a regression on the imx-media-csi driver.
Could you please consider applying this series that fixes the probe of the imx-media-csi driver?
Thanks
Re: [PATCH v3 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found
Quoted 20 lines · Fabio Estevam
Hi Mauro and Hans,
Quoted 17 lines · Fabio Estevam
Hi,
Quoted 13 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Since commit
52e17089d185("media: imx: Don't initialize vars that won't be used")imx_csi_probe()fails to probe after propagating thedevm_pinctrl_get_select_default()error.
devm_pinctrl_get_select_default()may return-ENODEVwhen the CSI pinctrl entry is not found, so better not to propagate the error in the-ENODEVcase to avoid a regression.Suggested-by Philipp Zabel <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Steve Longerbeam <[email protected]>
Quoted 6 lines
Quoted 3 lines
A gentle ping.
This series fixes a regression on the imx-media-csi driver.
Could you please consider applying this series that fixes the probe of the imx-media-csi driver?
It's delegated to Sakari.
Sakari, if you're busy then just let me know and I can take it.
Regards,
Hans
Philipp Zabel
maintainerHi,
Quoted 26 lines · Fabio Estevam
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 v2:
- None
Changes since v1:
- Nonedrivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/imx/imx-media-csi.c +0
-0
drivers/staging/media/imx/imx-media-csi.c static int imx_csi_probe(struct platform_device *pdev) · line 1801
Quoted 5 lines
drivers/staging/media/imx/imx-media-csi.c +1
-1@@ -1798,7 +1798,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);
The second patch is applied now, but this part is still missing in v4.17-rc1, causing the CSI subdev probe to fail:
imx-ipuv3-csi: probe of imx-ipuv3-csi.0 failed with error -1369528304
imx-ipuv3-csi: probe of imx-ipuv3-csi.1 failed with error -1369528304
imx-ipuv3-csi: probe of imx-ipuv3-csi.5 failed with error -1369528304
imx-ipuv3-csi: probe of imx-ipuv3-csi.6 failed with error -1369528304
regards
Philipp
Fabio Estevam
reviewerQuoted 7 lines · Philipp Zabel
The second patch is applied now, but this part is still missing in v4.17-rc1, causing the CSI subdev probe to fail:
imx-ipuv3-csi: probe of imx-ipuv3-csi.0 failed with error -1369528304
imx-ipuv3-csi: probe of imx-ipuv3-csi.1 failed with error -1369528304
imx-ipuv3-csi: probe of imx-ipuv3-csi.5 failed with error -1369528304
imx-ipuv3-csi: probe of imx-ipuv3-csi.6 failed with error -1369528304
Yes, this original patch does not apply against 4.17-rc1 anymore, so I rebased and resend it.
Thanks