mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
57a7a6db0e
commit
21b4d1db84
1 changed files with 6 additions and 3 deletions
|
@ -2621,11 +2621,14 @@ 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 (register_framebuffer(info) < 0)
|
||||
if (fb_alloc_cmap(&info->cmap, 256, 0) < 0)
|
||||
goto aty_init_exit;
|
||||
|
||||
if (register_framebuffer(info) < 0) {
|
||||
fb_dealloc_cmap(&info->cmap);
|
||||
goto aty_init_exit;
|
||||
}
|
||||
|
||||
fb_list = info;
|
||||
|
||||
PRINTKI("fb%d: %s frame buffer device on %s\n",
|
||||
|
|
Loading…
Reference in a new issue