[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220815180452.170706172@linuxfoundation.org>
Date: Mon, 15 Aug 2022 19:54:29 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Andrzej Hajda <andrzej.hajda@...el.com>,
Lucas Stach <l.stach@...gutronix.de>,
Marek Vasut <marex@...x.de>, Jonas Karlman <jonas@...boo.se>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Maxime Ripard <maxime@...no.tech>,
Neil Armstrong <narmstrong@...libre.com>,
Robert Foss <robert.foss@...aro.org>,
Sam Ravnborg <sam@...nborg.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.19 0313/1157] drm/bridge: tc358767: Handle dsi_lanes == 0 as invalid
From: Marek Vasut <marex@...x.de>
[ Upstream commit 0d662350928e6787d29ab205e47e5aa6f1f792f9 ]
Handle empty data-lanes = < >; property, which translates to
dsi_lanes = 0 as invalid.
Reviewed-by: Andrzej Hajda <andrzej.hajda@...el.com>
Reviewed-by: Lucas Stach <l.stach@...gutronix.de>
Fixes: bbfd3190b6562 ("drm/bridge: tc358767: Add DSI-to-DPI mode support")
Signed-off-by: Marek Vasut <marex@...x.de>
Cc: Jonas Karlman <jonas@...boo.se>
Cc: Laurent Pinchart <Laurent.pinchart@...asonboard.com>
Cc: Lucas Stach <l.stach@...gutronix.de>
Cc: Marek Vasut <marex@...x.de>
Cc: Maxime Ripard <maxime@...no.tech>
Cc: Neil Armstrong <narmstrong@...libre.com>
Cc: Robert Foss <robert.foss@...aro.org>
Cc: Sam Ravnborg <sam@...nborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220519095137.11896-1-marex@denx.de
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/bridge/tc358767.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 485717c8f0b4..466b8fc9836a 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1871,7 +1871,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)
--
2.35.1
Powered by blists - more mailing lists