summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-08-01 15:54:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 12:45:38 +0300
commit3e53531c1813a4bec25bd6ed3c18156886d9979e (patch)
tree3b5708af434671d973c43cff33fbfa35b0b8fe10 /drivers/gpu/drm
parentefd4b62d109fc970dc567ea756d42e675e030174 (diff)
downloadlinux-3e53531c1813a4bec25bd6ed3c18156886d9979e.tar.xz
drm/bridge: lvds-codec: Fix error checking of drm_of_lvds_get_data_mapping()
[ 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@denx.de> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sam Ravnborg <sam@ravnborg.org> To: dri-devel@lists.freedesktop.org Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220801125419.167562-1-marex@denx.de Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/bridge/lvds-codec.c2
1 files changed, 1 insertions, 1 deletions
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 {