Commit 95667791 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Mauro Carvalho Chehab
Browse files

media: platform: xilinx: fix error return code of xvip_graph_init()



When the list of xdev->notifier.asd_list is empty, no error return code
of xvip_graph_init() is assigned.
To fix this bug, ret is assigned with -ENOENT as error return code.

Reported-by: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 38e89e79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -525,6 +525,7 @@ static int xvip_graph_init(struct xvip_composite_device *xdev)

	if (list_empty(&xdev->notifier.asd_list)) {
		dev_err(xdev->dev, "no subdev found in graph\n");
		ret = -ENOENT;
		goto done;
	}