From: Aviv Laufer Date: Tue, 23 Jun 2009 13:28:36 +0000 (+0300) Subject: backlight: Fix tdo24m crash on kmalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1d469c6c38c9deaa1836d2c1955330944719e4ef;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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: Aviv Laufer Signed-off-by: Richard Purdie --- diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index 1dae7f8f3c6..51422fc4f60 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c @@ -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;