diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-10-17 13:19:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-08 11:11:52 -0500 |
commit | 13109fbc78018f0bdfd52b111d7c1443da650b78 (patch) | |
tree | 147cc36ef119e539865df1476cc9c584ebc870e1 /drivers/staging/media | |
parent | c8959a39fd47189a1474a4e92ffa34763589d6b0 (diff) | |
download | op-kernel-dev-13109fbc78018f0bdfd52b111d7c1443da650b78.zip op-kernel-dev-13109fbc78018f0bdfd52b111d7c1443da650b78.tar.gz |
media: staging: media: imx: fix inconsistent IS_ERR and PTR_ERR
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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/imx/imx-media-csi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index bb1d6da..ebb4ca5 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); |