diff options
author | Bibby Hsieh <bibby.hsieh@mediatek.com> | 2016-08-04 10:59:54 +0800 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2016-08-08 14:20:01 -0400 |
commit | 903daff60fc5629d39ceb5f870afecdc477bcd6c (patch) | |
tree | f27a86ab8aa6d5ed4cee0a3fd3bf4a9cb573563f /drivers/gpu/drm/mediatek/mtk_drm_crtc.c | |
parent | 5bfafad8059b40be3ab60be26d3270b74303639a (diff) |
drm/mediatek: Use drm_atomic destroy_state helpers
Use the core destroy_state helpers to destroy core state to ensure we don't
leak if/when more fields get added later.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-5-git-send-email-bibby.hsieh@mediatek.com
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index d6fbefa65619..733b2a3643de 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -112,8 +112,7 @@ static void mtk_drm_crtc_reset(struct drm_crtc *crtc) struct mtk_crtc_state *state; if (crtc->state) { - if (crtc->state->mode_blob) - drm_property_unreference_blob(crtc->state->mode_blob); + __drm_atomic_helper_crtc_destroy_state(crtc->state); state = to_mtk_crtc_state(crtc->state); memset(state, 0, sizeof(*state)); |