From: Egbert Eich Date: Tue, 18 Jul 2017 14:47:37 +0000 (+0200) Subject: drm/ast: Free container instead of member in ast_user_framebuffer_destroy() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f3b91060b5e4ae89fb7132b9e8e1958b829ddc22;p=linux.git drm/ast: Free container instead of member in ast_user_framebuffer_destroy() Technically freeing ast_fb->base is the same as freeing ast_fb as 'base' the first member of the data structure. Still this makes it cleaner. Signed-off-by: Egbert Eich Signed-off-by: Takashi Iwai Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 262c2c0e43b4b..50a8512ea6463 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -389,7 +389,7 @@ static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb) drm_gem_object_unreference_unlocked(ast_fb->obj); drm_framebuffer_cleanup(fb); - kfree(fb); + kfree(ast_fb); } static const struct drm_framebuffer_funcs ast_fb_funcs = {