Skip to content

Commit aec9fe8

Browse files
paulkocialkowskimmind
authored andcommitted
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: 34cc0aa ("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
1 parent aea656b commit aec9fe8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/rockchip/rockchip_lvds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
544544
struct device_node *port, *endpoint;
545545
int ret = 0, child_count = 0;
546546
const char *name;
547-
u32 endpoint_id;
547+
u32 endpoint_id = 0;
548548

549549
lvds->drm_dev = drm_dev;
550550
port = of_graph_get_port_by_id(dev->of_node, 1);

0 commit comments

Comments
 (0)