diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2018-01-17 22:55:29 +0100 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2018-03-14 12:38:02 +0100 |
commit | 084ffbd7fd147ce6e114d82298c84f143d4fff7f (patch) | |
tree | 30c85a60e3348424083ad8b4f41108cc1d863a1d /drivers/gpu/drm/arm/malidp_drv.c | |
parent | drm/mali-dp: Fix malidp_atomic_commit_hw_done() for event sending. (diff) | |
download | linux-084ffbd7fd147ce6e114d82298c84f143d4fff7f.tar.xz linux-084ffbd7fd147ce6e114d82298c84f143d4fff7f.zip |
drm: arm: malidp: Don't destroy planes manually in error handlers
The top-level error handler calls drm_mode_config_cleanup() which will
destroy all planes. There's no need to destroy them manually in lower
error handlers.
As plane cleanup is now handled entirely by drm_mode_config_cleanup(),
we must ensure that the plane .destroy() handler frees allocated memory
for the plane object that was freed by malidp_de_planes_destroy(). Do so
by replacing the call to devm_kfree() in the .destroy() handler by
kfree(). devm_kfree() is currently a no-op as the plane memory is
allocated with kzalloc(), not devm_kzalloc().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm/malidp_drv.c')
-rw-r--r-- | drivers/gpu/drm/arm/malidp_drv.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 3c628e43bf25..2b26f40a9786 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -278,7 +278,6 @@ static int malidp_init(struct drm_device *drm) static void malidp_fini(struct drm_device *drm) { - malidp_de_planes_destroy(drm); drm_mode_config_cleanup(drm); } |