diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2018-03-03 07:56:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-04 06:12:53 -0400 |
commit | dd5747fb9235d28ac2534e0ad4826a810a93e003 (patch) | |
tree | 0092fb8cbbd48e21e8119dd008226ff8e5dd02c2 /drivers | |
parent | cccc41fd3e8d1cfb6f4474470111cf03a6e18452 (diff) | |
download | op-kernel-dev-dd5747fb9235d28ac2534e0ad4826a810a93e003.zip op-kernel-dev-dd5747fb9235d28ac2534e0ad4826a810a93e003.tar.gz |
media: imx-media-csi: Do not propagate the error when pinctrl is not found
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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/imx/imx-media-csi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 00c9d62..16cab40 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1800,7 +1800,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(priv->vdev); - 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); |