Commit eb08c481 authored by Zhang Xiaoxu's avatar Zhang Xiaoxu Committed by Mauro Carvalho Chehab

media: tvp5150: Fix wrong return value of tvp5150_parse_dt()

If of_graph_get_endpoint_by_regs() return NULL, it will return 0 rather
than an errno, because we doesn't initialize the return value.

Fixes: 0556f1d5 ("media: tvp5150: add input source selection of_graph support")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: default avatarMarco Felsch <m.felsch@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent ca1cfc3f
...@@ -2080,6 +2080,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) ...@@ -2080,6 +2080,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np)
ep_np = of_graph_get_endpoint_by_regs(np, TVP5150_PAD_VID_OUT, 0); ep_np = of_graph_get_endpoint_by_regs(np, TVP5150_PAD_VID_OUT, 0);
if (!ep_np) { if (!ep_np) {
ret = -EINVAL;
dev_err(dev, "Error no output endpoint available\n"); dev_err(dev, "Error no output endpoint available\n");
goto err_free; goto err_free;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment