diff options
author | Jani Nikula <[email protected]> | 2024-05-30 13:01:52 +0300 |
---|---|---|
committer | Inki Dae <[email protected]> | 2024-07-03 13:00:12 +0900 |
commit | 679ca523843004bd656a712e703489e15be992c8 (patch) | |
tree | 82712bd8ff46f619490e663e216bbbd7aeb4d31c | |
parent | 98e05e40e9900818346adfcf0c6ef98664224dea (diff) |
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 <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 11a720fef32b..f613df719a02 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -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); |