mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
drm/exynos/vidi: use drm_edid_duplicate()
Don't open code drm_edid_duplicate(). While at it, drop the error message on allocation failure. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
98e05e40e9
commit
679ca52384
|
|
@ -308,7 +308,6 @@ static int vidi_get_modes(struct drm_connector *connector)
|
|||
{
|
||||
struct vidi_context *ctx = ctx_from_connector(connector);
|
||||
struct edid *edid;
|
||||
int edid_len;
|
||||
int count;
|
||||
|
||||
/*
|
||||
|
|
@ -320,12 +319,9 @@ static int vidi_get_modes(struct drm_connector *connector)
|
|||
return 0;
|
||||
}
|
||||
|
||||
edid_len = (1 + ctx->raw_edid->extensions) * EDID_LENGTH;
|
||||
edid = kmemdup(ctx->raw_edid, edid_len, GFP_KERNEL);
|
||||
if (!edid) {
|
||||
DRM_DEV_DEBUG_KMS(ctx->dev, "failed to allocate edid\n");
|
||||
edid = drm_edid_duplicate(ctx->raw_edid);
|
||||
if (!edid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
drm_connector_update_edid_property(connector, edid);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user