summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc_helper.c
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2015-04-20 19:22:50 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-05-07 11:03:02 +0200
commit9b0adc29d203116cadd81b663518104cfb19b48c (patch)
treeaa53bb47557ab3c2298e2cb91621df85ca12e86e /drivers/gpu/drm/drm_crtc_helper.c
parentbfcd74d2aeda25a78f7cc92f80650218b1bce0ca (diff)
downloadop-kernel-dev-9b0adc29d203116cadd81b663518104cfb19b48c.zip
op-kernel-dev-9b0adc29d203116cadd81b663518104cfb19b48c.tar.gz
drm/atomic: Don't open-code CRTC state destroy
One failure path in crtc_helper had an open-coded CRTC state destroy which didn't actually call through to the driver's specified state destroy. Fix that. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index ab00286..d727b73 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -959,7 +959,12 @@ int drm_helper_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mod
if (crtc_funcs->atomic_check) {
ret = crtc_funcs->atomic_check(crtc, crtc_state);
if (ret) {
- kfree(crtc_state);
+ if (crtc->funcs->atomic_destroy_state) {
+ crtc->funcs->atomic_destroy_state(crtc,
+ crtc_state);
+ } else {
+ kfree(crtc_state);
+ }
return ret;
}
OpenPOWER on IntegriCloud