drm: bridge: Return NULL on error from drm_bridge_get_edid()
The drm_bridge_get_edid() function is documented to return an error pointer on error. The underlying .get_edid() operation, however, returns NULL on error, and so do the drm_get_edid() and drm_do_get_edid() functions upon which .get_edid() is usually implemented. Make drm_bridge_get_edid() return NULL on error to be consistent. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-6-laurent.pinchart+renesas@ideasonboard.com
This commit is contained in:

committed by
Sam Ravnborg

parent
0bae6020b8
commit
11d3cf8045
@@ -51,11 +51,15 @@ static int tfp410_get_modes(struct drm_connector *connector)
|
||||
struct edid *edid;
|
||||
int ret;
|
||||
|
||||
edid = drm_bridge_get_edid(dvi->next_bridge, connector);
|
||||
if (IS_ERR_OR_NULL(edid)) {
|
||||
if (edid != ERR_PTR(-ENOTSUPP))
|
||||
if (dvi->next_bridge->ops & DRM_BRIDGE_OP_EDID) {
|
||||
edid = drm_bridge_get_edid(dvi->next_bridge, connector);
|
||||
if (!edid)
|
||||
DRM_INFO("EDID read failed. Fallback to standard modes\n");
|
||||
} else {
|
||||
edid = NULL;
|
||||
}
|
||||
|
||||
if (!edid) {
|
||||
/*
|
||||
* No EDID, fallback on the XGA standard modes and prefer a mode
|
||||
* pretty much anything can handle.
|
||||
|
Reference in New Issue
Block a user