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)
commit30be3031087139061de4421bf52015931eaab569
tree683b718245f9e247a9ec7079d9ea32016ccb4c7e
parent4606ed7ede0c1f8616c7d30cbf72230314888653
drm/bridge: panel: Return always an error pointer in drm_panel_bridge_add()

Since commit 89958b7cd955 ("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