media: tvp5150: Fix wrong return value of tvp5150_parse_dt()
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Mon, 16 Nov 2020 14:18:01 +0000 (15:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:31 +0000 (11:53 +0100)
commit1067e2496e936d55b24639fc583713ae05e71f61
treeb952327835f6d3c0c6ea2a7e41f6e63d2944f52d
parent9c14fb58a1a7b1c987eeb8bc107faf3f628f76d5
media: tvp5150: Fix wrong return value of tvp5150_parse_dt()

[ Upstream commit eb08c48132a1f594478ab9fa2b6ee646c3513a49 ]

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: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/tvp5150.c