diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-05-31 17:20:49 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-03 17:46:45 +0300 |
commit | c89b41343862cabcbe3cc85c6c7b675cdd939a29 (patch) | |
tree | 52ce930572697245c9ed9444e561f3b498a80215 /drivers/staging/media/imx/imx-media-csi.c | |
parent | 9f7406d6b56b4b71a12480b68221755ea7b3e0ee (diff) | |
download | linux-c89b41343862cabcbe3cc85c6c7b675cdd939a29.tar.xz |
media: staging/imx: fix two NULL vs IS_ERR() bugs
The imx_media_pipeline_pad() function return NULL pointers on error, it
never returns error pointers.
Fixes: 3ef46bc97ca2 ("media: staging/imx: Improve pipeline searching")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx/imx-media-csi.c')
-rw-r--r-- | drivers/staging/media/imx/imx-media-csi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index d2f880938af9..0eeb0db6d83f 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -193,8 +193,8 @@ static int csi_get_upstream_endpoint(struct csi_priv *priv, /* get source pad of entity directly upstream from src */ pad = imx_media_pipeline_pad(src, 0, 0, true); - if (IS_ERR(pad)) - return PTR_ERR(pad); + if (!pad) + return -ENODEV; sd = media_entity_to_v4l2_subdev(pad->entity); |