All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR
@ 2018-03-03 12:56 Fabio Estevam
  2018-03-03 12:56 ` [PATCH v3 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found Fabio Estevam
  2018-04-16 13:16 ` [PATCH v3 1/2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Philipp Zabel
  0 siblings, 2 replies; 7+ messages in thread
From: Fabio Estevam @ 2018-03-03 12:56 UTC (permalink / raw)
  To: mchehab; +Cc: slongerbeam, p.zabel, gustavo, linux-media, Fabio Estevam

From: Gustavo A. R. Silva <gustavo@embeddedor.com>

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.

Fixes: 52e17089d185 ("media: imx: Don't initialize vars that won't be used")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
---
Changes since v2:
- None
Changes since v1:
- None

 drivers/staging/media/imx/imx-media-csi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-16 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-03 12:56 [PATCH v3 1/2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Fabio Estevam
2018-03-03 12:56 ` [PATCH v3 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found Fabio Estevam
2018-03-10 15:53   ` Fabio Estevam
2018-03-23 13:03     ` Fabio Estevam
2018-03-23 13:10       ` Hans Verkuil
2018-04-16 13:16 ` [PATCH v3 1/2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Philipp Zabel
2018-04-16 17:32   ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.