summaryrefslogtreecommitdiff
path: root/drivers/media/platform/xilinx
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2021-03-05 12:48:19 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-22 12:19:45 +0300
commit95667791eb6e21a7f6c9ec4b633a8bf480a7675d (patch)
treeea277c5074d55b70e672c39e612a183f46339584 /drivers/media/platform/xilinx
parent38e89e790fe27f131d7310f9020d577bf9d2527f (diff)
downloadlinux-95667791eb6e21a7f6c9ec4b633a8bf480a7675d.tar.xz
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>
Diffstat (limited to 'drivers/media/platform/xilinx')
-rw-r--r--drivers/media/platform/xilinx/xilinx-vipp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index bf4015d852e3..2ce31d7ce1a6 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -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;
}