Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308965
b: refs/heads/master
c: c851529
h: refs/heads/master
i:
  308963: edbed4c
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed May 29, 2012
1 parent 32bf518 commit 88aeae4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f072c8900c11bc91eb3fa9287bab4ce606632be5
refs/heads/master: c8515294a31ec63536eb1a2ba7a38797435dda4f
8 changes: 3 additions & 5 deletions trunk/drivers/video/backlight/tosa_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ static int __devinit tosa_lcd_probe(struct spi_device *spi)
int ret;
struct tosa_lcd_data *data;

data = kzalloc(sizeof(struct tosa_lcd_data), GFP_KERNEL);
data = devm_kzalloc(&spi->dev, sizeof(struct tosa_lcd_data),
GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand All @@ -187,7 +188,7 @@ static int __devinit tosa_lcd_probe(struct spi_device *spi)

ret = spi_setup(spi);
if (ret < 0)
goto err_spi;
return ret;

data->spi = spi;
dev_set_drvdata(&spi->dev, data);
Expand Down Expand Up @@ -224,8 +225,6 @@ static int __devinit tosa_lcd_probe(struct spi_device *spi)
gpio_free(TOSA_GPIO_TG_ON);
err_gpio_tg:
dev_set_drvdata(&spi->dev, NULL);
err_spi:
kfree(data);
return ret;
}

Expand All @@ -242,7 +241,6 @@ static int __devexit tosa_lcd_remove(struct spi_device *spi)

gpio_free(TOSA_GPIO_TG_ON);
dev_set_drvdata(&spi->dev, NULL);
kfree(data);

return 0;
}
Expand Down

0 comments on commit 88aeae4

Please sign in to comment.