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

Commit 1bfd4d58 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  backlight: Fix tdo24m crash on kmalloc
parents 44b3615b 1d469c6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -356,7 +356,7 @@ static int __devinit tdo24m_probe(struct spi_device *spi)
	lcd->power = FB_BLANK_POWERDOWN;
	lcd->power = FB_BLANK_POWERDOWN;
	lcd->mode = MODE_VGA;	/* default to VGA */
	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) {
	if (lcd->buf == NULL) {
		kfree(lcd);
		kfree(lcd);
		return -ENOMEM;
		return -ENOMEM;