Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d469c6c authored by Aviv Laufer's avatar Aviv Laufer Committed by Richard Purdie
Browse files

backlight: Fix tdo24m crash on kmalloc



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: default avatarAviv Laufer <aviv.laufer@gmail.com>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent d888a4c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -356,7 +356,7 @@ static int __devinit tdo24m_probe(struct spi_device *spi)
	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;