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: 34cc0aa254
("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
This commit is contained in:
parent
aea656b0d0
commit
aec9fe8928
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue