Skip to content

Commit

Permalink
media: imx-media-csi: Do not propagate the error when pinctrl is not …
Browse files Browse the repository at this point in the history
…found

Since commit 52e1708 ("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 <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Steve Longerbeam <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Fabio Estevam authored and mchehab committed Apr 4, 2018
1 parent cccc41f commit dd5747f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/staging/media/imx/imx-media-csi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dd5747f

Please sign in to comment.