summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ast
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2016-11-14 06:03:59 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-11-14 09:45:16 +0300
commit554dd692afd5d449168b5007841742db4a2ed17b (patch)
tree0f2c05c8c029df52fc23ec2ac3288aeccc96e0b7 /drivers/gpu/drm/ast
parentdfeb693d5a5dab938fc9d371e6870da1b4c4b4cb (diff)
downloadlinux-554dd692afd5d449168b5007841742db4a2ed17b.tar.xz
drm/ast: free correct pointer in astfb_create() error paths
In the err_free_vram and err_release_fbi error paths in astfb_create(), we attempt to free afbdev->sysram. The only jumps to these error paths occur before we assign afbdev->sysram = sysram. Free sysram instead. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20161114030359.27852-1-andrew.donnellan@au1.ibm.com
Diffstat (limited to 'drivers/gpu/drm/ast')
-rw-r--r--drivers/gpu/drm/ast/ast_fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index 7a86e24e2687..d6f5ec64c667 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -253,7 +253,7 @@ static int astfb_create(struct drm_fb_helper *helper,
err_release_fbi:
drm_fb_helper_release_fbi(helper);
err_free_vram:
- vfree(afbdev->sysram);
+ vfree(sysram);
return ret;
}