Skip to content

Commit

Permalink
drm/ast: Free container instead of member in ast_user_framebuffer_des…
Browse files Browse the repository at this point in the history
…troy()

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 <eich@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Egbert Eich authored and Dave Airlie committed Aug 2, 2017
1 parent 587b9b1 commit f3b9106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ast/ast_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit f3b9106

Please sign in to comment.