drm/rockchip: Avoid uninitialized use of endpoint id in LVDS
Subsystems (4)
PATCH 1/1 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.
--- drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rockchip/rockchip_lvds.c +1 -1
@@ -544,7 +544,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,struct device_node *port, *endpoint;int ret =0 , child_count =0 ;const char *name; -u32 endpoint_id; +u32 endpoint_id =0 ; lvds->drm_dev = drm_dev; port =of_graph_get_port_by_id (dev->of_node,1 );
Signature · 1 line
2.28.0
Quoted 6 lines · Paul Kocialkowski
In the Rockchip DRM LVDS component driver, the endpoint id provided to
drm_of_find_panel_or_bridgeis grabbed from the endpoint's reg property.However, the property may be missing in the case of a single endpoint. Initialize the
endpoint_idvariable to 0 to avoid using an uninitialized variable in that case.
Applied, thanks!
[1/1] drm/rockchip: Avoid uninitialized use of endpoint id in LVDS
commit: aec9fe892812ed10d0bffcf309d2a8fc380d8ce6
Best regards,
Signature · 5 lines
Heiko Stuebner <[email protected]> _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel