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: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Jia-Ju Bai 2021-03-05 10:48:19 +01:00 коммит произвёл Mauro Carvalho Chehab
Родитель 38e89e790f
Коммит 95667791eb
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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;
}