Skip to content

Commit 2bba782

Browse files
author
Marek Vasut
committed
drm/bridge: lvds-codec: Fix error checking of drm_of_lvds_get_data_mapping()
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: 7c4dd0a ("drm: of: Add drm_of_lvds_get_data_mapping") Signed-off-by: Marek Vasut <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Sam Ravnborg <[email protected]> To: [email protected] Reviewed-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent cf4b738 commit 2bba782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/bridge/lvds-codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int lvds_codec_probe(struct platform_device *pdev)
180180
of_node_put(bus_node);
181181
if (ret == -ENODEV) {
182182
dev_warn(dev, "missing 'data-mapping' DT property\n");
183-
} else if (ret) {
183+
} else if (ret < 0) {
184184
dev_err(dev, "invalid 'data-mapping' DT property\n");
185185
return ret;
186186
} else {

0 commit comments

Comments
 (0)