Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308957
b: refs/heads/master
c: 9828eb0
h: refs/heads/master
i:
  308955: a95a1d0
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed May 29, 2012
1 parent afc0dad commit d07a7de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 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: 06c96f189bf94448779db66944836a827517d6c9
refs/heads/master: 9828eb09bf5a450bd40a6931a751a122a4c66e2b
9 changes: 2 additions & 7 deletions trunk/drivers/video/backlight/ili9320.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int __devinit ili9320_probe_spi(struct spi_device *spi,

/* allocate and initialse our state */

ili = kzalloc(sizeof(struct ili9320), GFP_KERNEL);
ili = devm_kzalloc(&spi->dev, sizeof(struct ili9320), GFP_KERNEL);
if (ili == NULL) {
dev_err(dev, "no memory for device\n");
return -ENOMEM;
Expand All @@ -240,8 +240,7 @@ int __devinit ili9320_probe_spi(struct spi_device *spi,
lcd = lcd_device_register("ili9320", dev, ili, &ili9320_ops);
if (IS_ERR(lcd)) {
dev_err(dev, "failed to register lcd device\n");
ret = PTR_ERR(lcd);
goto err_free;
return PTR_ERR(lcd);
}

ili->lcd = lcd;
Expand All @@ -259,9 +258,6 @@ int __devinit ili9320_probe_spi(struct spi_device *spi,
err_unregister:
lcd_device_unregister(lcd);

err_free:
kfree(ili);

return ret;
}

Expand All @@ -272,7 +268,6 @@ int __devexit ili9320_remove(struct ili9320 *ili)
ili9320_power(ili, FB_BLANK_POWERDOWN);

lcd_device_unregister(ili->lcd);
kfree(ili);

return 0;
}
Expand Down

0 comments on commit d07a7de

Please sign in to comment.