Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308960
b: refs/heads/master
c: 26f2b35
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed May 29, 2012
1 parent 9537140 commit e76edae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: 86f6be4fae7aeaeb038dc809b232ebe76b2e1dd2
refs/heads/master: 26f2b35c1e1463c851be23c9774bd24caae7b517
9 changes: 3 additions & 6 deletions trunk/drivers/video/backlight/lms283gf05.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ static int __devinit lms283gf05_probe(struct spi_device *spi)
goto err;
}

st = kzalloc(sizeof(struct lms283gf05_state), GFP_KERNEL);
st = devm_kzalloc(&spi->dev, sizeof(struct lms283gf05_state),
GFP_KERNEL);
if (st == NULL) {
dev_err(&spi->dev, "No memory for device state\n");
ret = -ENOMEM;
Expand All @@ -178,7 +179,7 @@ static int __devinit lms283gf05_probe(struct spi_device *spi)
ld = lcd_device_register("lms283gf05", &spi->dev, st, &lms_ops);
if (IS_ERR(ld)) {
ret = PTR_ERR(ld);
goto err2;
goto err;
}

st->spi = spi;
Expand All @@ -193,8 +194,6 @@ static int __devinit lms283gf05_probe(struct spi_device *spi)

return 0;

err2:
kfree(st);
err:
if (pdata != NULL)
gpio_free(pdata->reset_gpio);
Expand All @@ -212,8 +211,6 @@ static int __devexit lms283gf05_remove(struct spi_device *spi)
if (pdata != NULL)
gpio_free(pdata->reset_gpio);

kfree(st);

return 0;
}

Expand Down

0 comments on commit e76edae

Please sign in to comment.