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@xxxxxxx> Signed-off-by: Gustavo A. R. Silva <garsilva@xxxxxxxxxxxxxx> --- 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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel