diff options
author | Marek Vasut <[email protected]> | 2022-06-12 15:21:51 +0200 |
---|---|---|
committer | Marek Vasut <[email protected]> | 2022-06-12 16:07:06 +0200 |
commit | c750c4ce1ad69d3df68359abce70ee3d0064c97a (patch) | |
tree | 19d50be2e70f36f6962e9c7d9f3ff953045054a4 | |
parent | eb6b94db2f4a585d4a9b8e503d7377d2a23c1104 (diff) |
drm/bridge: tc358775: Fix drm_of_get_data_lanes_count_ep conversion
Initialize dsi_lanes to -1, so that in case the endpoint is missing,
probe would fail as it did before the conversion, instead of depending
on uninitialized variable and thus undefined behavior.
Fixes: 56426faa1492 ("drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Marek Vasut <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Robert Foss <[email protected]>
Cc: Sam Ravnborg <[email protected]>
To: [email protected]
Acked-by: Sam Ravnborg <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/bridge/tc358775.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c index 5b1fb8e2f9a7..e5d00a6e7880 100644 --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -529,7 +529,7 @@ static int tc358775_parse_dt(struct device_node *np, struct tc_data *tc) struct device_node *endpoint; struct device_node *parent; struct device_node *remote; - int dsi_lanes; + int dsi_lanes = -1; /* * To get the data-lanes of dsi, we need to access the dsi0_out of port1 |