]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: tc358775: Fix drm_of_get_data_lanes_count_ep conversion
authorMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 13:21:51 +0000 (15:21 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 14:07:06 +0000 (16:07 +0200)
commit8095329b65bc2e009ccd96994afe299f70269551
tree19d50be2e70f36f6962e9c7d9f3ff953045054a4
parent86f9b7b4883dcf8f01f76110dd9977b0c746c64c
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: 3a198c03aa8b ("drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220612132152.91052-2-marex@denx.de
drivers/gpu/drm/bridge/tc358775.c