diff mbox

[v3,2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found

Message ID 1520081790-3437-2-git-send-email-festevam@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam March 3, 2018, 12:56 p.m. UTC
From: Fabio Estevam <fabio.estevam@nxp.com>

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.

Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
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(-)

Comments

Fabio Estevam March 10, 2018, 3:53 p.m. UTC | #1
Hi,

On Sat, Mar 3, 2018 at 9:56 AM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> 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.
>
> Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>

A gentle ping.

This series fixes a regression on the imx-media-csi driver.

Thanks
Fabio Estevam March 23, 2018, 1:03 p.m. UTC | #2
Hi Mauro and Hans,

On Sat, Mar 10, 2018 at 12:53 PM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi,
>
> On Sat, Mar 3, 2018 at 9:56 AM, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>
>> 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.
>>
>> Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>> Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
>
> 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
Hans Verkuil March 23, 2018, 1:10 p.m. UTC | #3
On 03/23/18 14:03, Fabio Estevam wrote:
> Hi Mauro and Hans,
> 
> On Sat, Mar 10, 2018 at 12:53 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> Hi,
>>
>> On Sat, Mar 3, 2018 at 9:56 AM, Fabio Estevam <festevam@gmail.com> wrote:
>>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>>
>>> 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.
>>>
>>> Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
>>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>>> Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
>>
>> 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
diff mbox

Patch

diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 4f290a0..5af66f6 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -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);