Commit 0d662350 authored by Marek Vasut's avatar Marek Vasut

drm/bridge: tc358767: Handle dsi_lanes == 0 as invalid

Handle empty data-lanes = < >; property, which translates to
dsi_lanes = 0 as invalid.
Reviewed-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: default avatarLucas Stach <l.stach@pengutronix.de>
Fixes: bbfd3190 ("drm/bridge: tc358767: Add DSI-to-DPI mode support")
Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220519095137.11896-1-marex@denx.de
parent 39c28cdf
......@@ -1899,7 +1899,7 @@ static int tc_mipi_dsi_host_attach(struct tc_data *tc)
of_node_put(host_node);
of_node_put(endpoint);
if (dsi_lanes < 0 || dsi_lanes > 4)
if (dsi_lanes <= 0 || dsi_lanes > 4)
return -EINVAL;
if (!host)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment