All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] /drivers/video/backlight/tdo24m - crash on kmalloc
@ 2009-06-23 13:28 Aviv Laufer
  2009-06-23 19:53 ` Richard Purdie
  2009-06-29  7:18 ` Eric Miao
  0 siblings, 2 replies; 3+ messages in thread
From: Aviv Laufer @ 2009-06-23 13:28 UTC (permalink / raw)
  To: rpurdie, linux-kernel

There is  a crash in tdo24m module caused by a call to kmalloc with
the second parameter sizeof(flag) instead of flag.

Signed-off-by: Aviv Laufer <aviv.laufer@gmail.com>
---


--- linux-2.6.30/drivers/video/backlight/tdo24m.c.orig	2009-06-23
15:08:02.000000000 +0300
+++ linux-2.6.30/drivers/video/backlight/tdo24m.c	2009-06-23
15:09:05.000000000 +0300
@@ -356,7 +356,7 @@ static int __devinit tdo24m_probe(struct
 	lcd->power = FB_BLANK_POWERDOWN;
 	lcd->mode = MODE_VGA;	/* default to VGA */

-	lcd->buf = kmalloc(TDO24M_SPI_BUFF_SIZE, sizeof(GFP_KERNEL));
+	lcd->buf = kmalloc(TDO24M_SPI_BUFF_SIZE, GFP_KERNEL);
 	if (lcd->buf == NULL) {
 		kfree(lcd);
 		return -ENOMEM;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-29  7:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23 13:28 [PATCH] /drivers/video/backlight/tdo24m - crash on kmalloc Aviv Laufer
2009-06-23 19:53 ` Richard Purdie
2009-06-29  7:18 ` Eric Miao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.