Thread (3 messages) flat view 3 messages, 2 authors, 2007-10-27

Re: [PATCH] Free when fb can't be registered in video/aty/atyfb_base.c

From: Roel Kluin <hidden>
Date: 2007-10-27 12:31:22
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

Randy Dunlap wrote:
Use tabs for indent above, not spaces.

Yes, looks needed to me.  Hopefully Tony will correct us if we
are wrong.
Thanks for reviewing, here is one without the little spaces
--
Signed-off-by: Roel Kluin <redacted>
--
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index d775eb6..669abd3 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2680,10 +2680,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;
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help