diff options
Diffstat (limited to 'drivers/video')
-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) | |||
2621 | #endif /* CONFIG_FB_ATY_CT */ | 2621 | #endif /* CONFIG_FB_ATY_CT */ |
2622 | info->var = var; | 2622 | info->var = var; |
2623 | 2623 | ||
2624 | fb_alloc_cmap(&info->cmap, 256, 0); | 2624 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) |
2625 | goto aty_init_exit; | ||
2625 | 2626 | ||
2626 | if (register_framebuffer(info) < 0) | 2627 | if (register_framebuffer(info) < 0) { |
2628 | fb_dealloc_cmap(&info->cmap); | ||
2627 | goto aty_init_exit; | 2629 | goto aty_init_exit; |
2630 | } | ||
2628 | 2631 | ||
2629 | fb_list = info; | 2632 | fb_list = info; |
2630 | 2633 | ||