]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 29 Nov 2020 16:33:32 +0000 (17:33 +0100)
commitb286a584008c67ccd2e5e15d9bd6be211bc1a384
tree3709f285083348e2d6b5546fe0ab3378c4f2d051
parent60df34fc1ef3b96de1547d83c3be0c8872333cdb
drm/rockchip: Avoid uninitialized use of endpoint id in LVDS

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: f8c529d8e205 ("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
drivers/gpu/drm/rockchip/rockchip_lvds.c