]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: panel: Return always an error pointer in drm_panel_bridge_add()
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Thu, 16 Apr 2020 21:06:54 +0000 (23:06 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Sat, 25 Apr 2020 14:48:55 +0000 (16:48 +0200)
commitb320bc71a00b77b00da0358387d6a811755f3efd
tree683b718245f9e247a9ec7079d9ea32016ccb4c7e
parentac06a1a6860751ac7ad178a9d6245bfafee7fa57
drm/bridge: panel: Return always an error pointer in drm_panel_bridge_add()

Since commit 551687410c5a ("drm/bridge: panel: Infer connector type from
panel by default"), drm_panel_bridge_add() and their variants can return
NULL and an error pointer. This is fine but none of the actual users of
the API are checking for the NULL value. Instead of change all the
users, seems reasonable to return an error pointer instead. So change
the returned value for those functions when the connector type is unknown.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200416210654.2468805-1-enric.balletbo@collabora.com
drivers/gpu/drm/bridge/panel.c