Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e159b607 authored by Helen Fornazier's avatar Helen Fornazier Committed by Mauro Carvalho Chehab
Browse files

media: vimc: fix start stream when link is disabled



If link is disabled, media_entity_remote_pad returns NULL, causing a
NULL pointer deference.
Ignore links that are not enabled instead.

Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent ee494cf3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -276,6 +276,8 @@ int vimc_pipeline_s_stream(struct media_entity *ent, int enable)

		/* Start the stream in the subdevice direct connected */
		pad = media_entity_remote_pad(&ent->pads[i]);
		if (!pad)
			continue;

		if (!is_media_entity_v4l2_subdev(pad->entity))
			return -EINVAL;