Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258927
b: refs/heads/master
c: e2e7da9
h: refs/heads/master
i:
  258925: 894f303
  258923: 176c359
  258919: c71623c
  258911: 270bbdf
v: v3
  • Loading branch information
Axel Lin authored and Linus Torvalds committed Jul 26, 2011
1 parent bf0b07f commit a550dfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: ccb6108f5b0b541d3eb332c3a73e645c0f84278e
refs/heads/master: e2e7da9bccd77ef6793b865c1b78c7e519ccc562
9 changes: 6 additions & 3 deletions trunk/drivers/video/backlight/ld9040.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,9 @@ static int ld9040_probe(struct spi_device *spi)

bd = backlight_device_register("ld9040-bl", &spi->dev,
lcd, &ld9040_backlight_ops, NULL);
if (IS_ERR(ld)) {
ret = PTR_ERR(ld);
goto out_free_lcd;
if (IS_ERR(bd)) {
ret = PTR_ERR(bd);
goto out_unregister_lcd;
}

bd->props.max_brightness = MAX_BRIGHTNESS;
Expand Down Expand Up @@ -731,6 +731,8 @@ static int ld9040_probe(struct spi_device *spi)
dev_info(&spi->dev, "ld9040 panel driver has been probed.\n");
return 0;

out_unregister_lcd:
lcd_device_unregister(lcd->ld);
out_free_lcd:
kfree(lcd);
return ret;
Expand All @@ -741,6 +743,7 @@ static int __devexit ld9040_remove(struct spi_device *spi)
struct ld9040 *lcd = dev_get_drvdata(&spi->dev);

ld9040_power(lcd, FB_BLANK_POWERDOWN);
backlight_device_unregister(lcd->bd);
lcd_device_unregister(lcd->ld);
kfree(lcd);

Expand Down

0 comments on commit a550dfd

Please sign in to comment.