drm/rockchip: Avoid uninitialized use of endpoint id in LVDS
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Tue, 10 Nov 2020 20:04:30 +0000 (21:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Dec 2020 09:58:27 +0000 (10:58 +0100)
commitddfe8fbf9b635b6277715c7040c8ce393bf3a39c
treebf9ca1d5ea3cca7b0f98dc2a898f90d0b8e07697
parent5e3328abfd3d9a57f1ab27574630b69be5585cf1
drm/rockchip: Avoid uninitialized use of endpoint id in LVDS

[ Upstream commit aec9fe892812ed10d0bffcf309d2a8fc380d8ce6 ]

In the Rockchip DRM LVDS component driver, the endpoint id provided to
drm_of_find_panel_or_bridge is grabbed from the endpoint's reg property.

However, the property may be missing in the case of a single endpoint.
Initialize the endpoint_id variable to 0 to avoid using an
uninitialized variable in that case.

Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS")
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201110200430.1713467-1-paul.kocialkowski@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/rockchip/rockchip_lvds.c