diff options
author | Roel Kluin <12o3l@tiscali.nl> | 2008-04-28 02:15:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 08:58:37 -0700 |
commit | 21b4d1db84a70175251d86078123cc27e46ff69d (patch) | |
tree | 22820636cf5724acffde6e851e8fb11a891db0fe /drivers | |
parent | 57a7a6db0eed2862072497116232f57a6843cadd (diff) | |
download | blackbird-op-linux-21b4d1db84a70175251d86078123cc27e46ff69d.tar.gz blackbird-op-linux-21b4d1db84a70175251d86078123cc27e46ff69d.zip |
video/aty/atyfb_base.c: free when fb can't be registered
Free buffer when the framebuffer can't be registered
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 62f9c6e387cc..e4bcf5376a99 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -2621,10 +2621,13 @@ static int __devinit aty_init(struct fb_info *info) #endif /* CONFIG_FB_ATY_CT */ info->var = var; - fb_alloc_cmap(&info->cmap, 256, 0); + if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) + goto aty_init_exit; - if (register_framebuffer(info) < 0) + if (register_framebuffer(info) < 0) { + fb_dealloc_cmap(&info->cmap); goto aty_init_exit; + } fb_list = info; |