[PATCH 04/14] drm/mgag200: Free container instead of member in mga_user_framebuffer_destroy()
Takashi Iwai
tiwai at suse.de
Tue Jul 18 14:43:10 UTC 2017
From: Egbert Eich <eich at suse.de>
Technically freeing mga_fb->base is the same as freeing mga_fb as 'base'
the first member of the data structure.
Still this makes it cleaner.
Signed-off-by: Egbert Eich <eich at suse.de>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
drivers/gpu/drm/mgag200/mgag200_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index dce8a3eb5a10..cf3a602f453f 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -20,7 +20,7 @@ static void mga_user_framebuffer_destroy(struct drm_framebuffer *fb)
drm_gem_object_unreference_unlocked(mga_fb->obj);
drm_framebuffer_cleanup(fb);
- kfree(fb);
+ kfree(mga_fb);
}
static const struct drm_framebuffer_funcs mga_fb_funcs = {
--
2.13.2
More information about the dri-devel
mailing list