[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220613094926.932783624@linuxfoundation.org>
Date: Mon, 13 Jun 2022 12:10:33 +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, Marek Vasut <marex@...x.de>,
Jonas Karlman <jonas@...boo.se>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Lucas Stach <l.stach@...gutronix.de>,
Maxime Ripard <maxime@...no.tech>,
Neil Armstrong <narmstrong@...libre.com>,
Robert Foss <robert.foss@...aro.org>,
Sam Ravnborg <sam@...nborg.org>,
Andrzej Hajda <andrzej.hajda@...el.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.15 131/247] drm/bridge: ti-sn65dsi83: Handle dsi_lanes == 0 as invalid
From: Marek Vasut <marex@...x.de>
[ Upstream commit edbc7960bef7fd71ef1e44d0df15b864784b14c8 ]
Handle empty data-lanes = < >; property, which translates to
dsi_lanes = 0 as invalid.
Fixes: ceb515ba29ba6 ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver")
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>
Reviewed-by: Andrzej Hajda <andrzej.hajda@...el.com>
Reviewed-by: Lucas Stach <l.stach@...gutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220518233844.248504-1-marex@denx.de
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
index bf469e8ac563..c901c0e1a3b0 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@ -608,7 +608,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model)
ctx->host_node = of_graph_get_remote_port_parent(endpoint);
of_node_put(endpoint);
- if (ctx->dsi_lanes < 0 || ctx->dsi_lanes > 4) {
+ if (ctx->dsi_lanes <= 0 || ctx->dsi_lanes > 4) {
ret = -EINVAL;
goto err_put_node;
}
--
2.35.1
Powered by blists - more mailing lists