diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-04-22 15:28:32 -0400 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-06-01 09:59:35 -0400 |
commit | c2e4c99444f418b3c3b13b58dad4d951aa2f7f1b (patch) | |
tree | 270abc7f26d8790fc8e2ade47ec1716069cd92ef /drivers/gpu/drm/atmel-hlcdc | |
parent | 1a695a905c18548062509178b98bc91e67510864 (diff) |
drm: atmel-hlcdc: fix atmel_hlcdc_crtc_reset() implementation
Reset crtc->state to NULL after freeing the state object and call
__drm_atomic_helper_crtc_destroy_state() helper instead of manually
calling drm_property_unreference_blob().
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/gpu/drm/atmel-hlcdc')
-rw-r--r-- | drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index cf23a755f777..ac4e0632c2de 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | |||
@@ -391,12 +391,11 @@ void atmel_hlcdc_crtc_reset(struct drm_crtc *crtc) | |||
391 | { | 391 | { |
392 | struct atmel_hlcdc_crtc_state *state; | 392 | struct atmel_hlcdc_crtc_state *state; |
393 | 393 | ||
394 | if (crtc->state && crtc->state->mode_blob) | ||
395 | drm_property_unreference_blob(crtc->state->mode_blob); | ||
396 | |||
397 | if (crtc->state) { | 394 | if (crtc->state) { |
395 | __drm_atomic_helper_crtc_destroy_state(crtc->state); | ||
398 | state = drm_crtc_state_to_atmel_hlcdc_crtc_state(crtc->state); | 396 | state = drm_crtc_state_to_atmel_hlcdc_crtc_state(crtc->state); |
399 | kfree(state); | 397 | kfree(state); |
398 | crtc->state = NULL; | ||
400 | } | 399 | } |
401 | 400 | ||
402 | state = kzalloc(sizeof(*state), GFP_KERNEL); | 401 | state = kzalloc(sizeof(*state), GFP_KERNEL); |