mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
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 <aviv.laufer@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
d888a4c76c
commit
1d469c6c38
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user