Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233920
b: refs/heads/master
c: 9dab51d
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Linus Torvalds committed Mar 5, 2011
1 parent f6cfa10 commit 6bbe08c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 10ffa96407b230ea7fc72abd32c6795183f38fa1
refs/heads/master: 9dab51daef2e4a0d18d7824e23fcb64a2a86481d
9 changes: 8 additions & 1 deletion trunk/drivers/video/backlight/ltv350qv.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,15 @@ static int __devinit ltv350qv_probe(struct spi_device *spi)
lcd->spi = spi;
lcd->power = FB_BLANK_POWERDOWN;
lcd->buffer = kzalloc(8, GFP_KERNEL);
if (!lcd->buffer) {
ret = -ENOMEM;
goto out_free_lcd;
}

ld = lcd_device_register("ltv350qv", &spi->dev, lcd, &ltv_ops);
if (IS_ERR(ld)) {
ret = PTR_ERR(ld);
goto out_free_lcd;
goto out_free_buffer;
}
lcd->ld = ld;

Expand All @@ -257,6 +261,8 @@ static int __devinit ltv350qv_probe(struct spi_device *spi)

out_unregister:
lcd_device_unregister(ld);
out_free_buffer:
kfree(lcd->buffer);
out_free_lcd:
kfree(lcd);
return ret;
Expand All @@ -268,6 +274,7 @@ static int __devexit ltv350qv_remove(struct spi_device *spi)

ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
lcd_device_unregister(lcd->ld);
kfree(lcd->buffer);
kfree(lcd);

return 0;
Expand Down

0 comments on commit 6bbe08c

Please sign in to comment.