Thread (4 messages) 4 messages, 2 authors, 2010-11-11

Re: [PATCH 2/4 v2] fbdev: export fb_edid_add_monspecs() for modules, improve algorithm

flat view

From: Paul Mundt <hidden>
Date: 2010-11-10 04:14:41
Also in: linux-sh

On Tue, Nov 02, 2010 at 11:47:36AM +0100, Guennadi Liakhovetski wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index a0b5a93..38b3c30 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -973,58 +973,56 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
 	DPRINTK("====================\n");
 }
 
+/**
+ * fb_edid_add_monspecs() - add monitor video modes from E-EDID data
+ * @edid:	128 byte array with an E-EDID block
+ * @spacs:	monitor specs to be extended
+ */
 void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
 {
[snip]
quoted hunk ↗ jump to hunk
 	m = kzalloc((specs->modedb_len + num) *
 		       sizeof(struct fb_videomode), GFP_KERNEL);
 
-	if (!m) {
-		kfree(mode);
+	if (!m)
 		return;
+
This can obviously fail, and should be returning the error value instead
of simply quashing it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help