* [PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR
@ 2017-10-17 17:19 Gustavo A. R. Silva
2017-10-17 17:21 ` Steve Longerbeam
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-17 17:19 UTC (permalink / raw)
To: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman
Cc: linux-media, devel, linux-kernel, Julia Lawall,
Gustavo A. R. Silva
Fix inconsistent IS_ERR and PTR_ERR in csi_link_validate.
The proper pointer to be passed as argument is sensor.
This issue was detected with the help of Coccinelle.
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
This code was tested by compilation only.
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 6d85611..2fa72c1 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -989,7 +989,7 @@ static int csi_link_validate(struct v4l2_subdev *sd,
sensor = __imx_media_find_sensor(priv->md, &priv->sd.entity);
if (IS_ERR(sensor)) {
v4l2_err(&priv->sd, "no sensor attached\n");
- return PTR_ERR(priv->sensor);
+ return PTR_ERR(sensor);
}
mutex_lock(&priv->lock);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR
2017-10-17 17:19 [PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
@ 2017-10-17 17:21 ` Steve Longerbeam
0 siblings, 0 replies; 2+ messages in thread
From: Steve Longerbeam @ 2017-10-17 17:21 UTC (permalink / raw)
To: Gustavo A. R. Silva, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman
Cc: linux-media, devel, linux-kernel, Julia Lawall
On 10/17/2017 10:19 AM, Gustavo A. R. Silva wrote:
> Fix inconsistent IS_ERR and PTR_ERR in csi_link_validate.
> The proper pointer to be passed as argument is sensor.
>
> This issue was detected with the help of Coccinelle.
>
> Reported-by: Julia Lawall<julia.lawall@lip6.fr>
> Signed-off-by: Gustavo A. R. Silva<garsilva@embeddedor.com>
> ---
> This code was tested by compilation only.
>
> 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 6d85611..2fa72c1 100644
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -989,7 +989,7 @@ static int csi_link_validate(struct v4l2_subdev *sd,
> sensor = __imx_media_find_sensor(priv->md, &priv->sd.entity);
> if (IS_ERR(sensor)) {
> v4l2_err(&priv->sd, "no sensor attached\n");
> - return PTR_ERR(priv->sensor);
> + return PTR_ERR(sensor);
> }
>
> mutex_lock(&priv->lock);
Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-17 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 17:19 [PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2017-10-17 17:21 ` Steve Longerbeam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox