[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220823080128.500334591@linuxfoundation.org>
Date: Tue, 23 Aug 2022 10:02:27 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Marek Vasut <marex@...x.de>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sam Ravnborg <sam@...nborg.org>,
Neil Armstrong <narmstrong@...libre.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.19 246/365] drm/bridge: lvds-codec: Fix error checking of drm_of_lvds_get_data_mapping()
From: Marek Vasut <marex@...x.de>
[ Upstream commit 2bba782002c5dab6ca8d608b778b386fb912adff ]
The drm_of_lvds_get_data_mapping() returns either negative value on
error or MEDIA_BUS_FMT_* otherwise. The check for 'ret' would also
catch the positive case of MEDIA_BUS_FMT_* and lead to probe failure
every time 'data-mapping' DT property is specified.
Fixes: 7c4dd0a266527 ("drm: of: Add drm_of_lvds_get_data_mapping")
Signed-off-by: Marek Vasut <marex@...x.de>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Sam Ravnborg <sam@...nborg.org>
To: dri-devel@...ts.freedesktop.org
Reviewed-by: Neil Armstrong <narmstrong@...libre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220801125419.167562-1-marex@denx.de
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/bridge/lvds-codec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c
index 702ea803a743..39e7004de720 100644
--- a/drivers/gpu/drm/bridge/lvds-codec.c
+++ b/drivers/gpu/drm/bridge/lvds-codec.c
@@ -180,7 +180,7 @@ static int lvds_codec_probe(struct platform_device *pdev)
of_node_put(bus_node);
if (ret == -ENODEV) {
dev_warn(dev, "missing 'data-mapping' DT property\n");
- } else if (ret) {
+ } else if (ret < 0) {
dev_err(dev, "invalid 'data-mapping' DT property\n");
return ret;
} else {
--
2.35.1
Powered by blists - more mailing lists