Skip to content

Commit

Permalink
drm/msm: dpu: Fix "WARNING: invalid free of devm_ allocated data"
Browse files Browse the repository at this point in the history
'dpu_enc' is a member of 'drm_enc'
And 'drm_enc' got allocated with devm_kzalloc in dpu_encoder_init.

This gives this error message:
./drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:459:1-6:
 WARNING: invalid free of devm_ allocated data

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
  • Loading branch information
YueHaibing authored and Sean Paul committed Dec 3, 2018
1 parent 6714651 commit ce25aa3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,6 @@ static void dpu_encoder_destroy(struct drm_encoder *drm_enc)

drm_encoder_cleanup(drm_enc);
mutex_destroy(&dpu_enc->enc_lock);

kfree(dpu_enc);
}

void dpu_encoder_helper_split_config(
Expand Down

0 comments on commit ce25aa3

Please sign in to comment.