mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 23:56:45 +07:00
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: 3ef46bc97c
("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>
This commit is contained in:
parent
9f7406d6b5
commit
c89b413438
@ -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);
|
||||
|
||||
|
@ -439,8 +439,8 @@ static int imx7_csi_get_upstream_endpoint(struct imx7_csi *csi,
|
||||
skip_video_mux:
|
||||
/* 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user