Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283054
b: refs/heads/master
c: 48e78e8
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Linus Torvalds committed Jan 11, 2012
1 parent ca42d8b commit 1f88dff
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 66655760bf38861299e3c8196f5303f886b0eef9
refs/heads/master: 48e78e8cc87ab80617ef0c5a146701ca96a4a51d
9 changes: 4 additions & 5 deletions trunk/drivers/video/backlight/platform_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
return -EINVAL;
}

plcd = kzalloc(sizeof(struct platform_lcd), GFP_KERNEL);
plcd = devm_kzalloc(&pdev->dev, sizeof(struct platform_lcd),
GFP_KERNEL);
if (!plcd) {
dev_err(dev, "no memory for state\n");
return -ENOMEM;
Expand All @@ -98,16 +99,15 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
if (IS_ERR(plcd->lcd)) {
dev_err(dev, "cannot register lcd device\n");
err = PTR_ERR(plcd->lcd);
goto err_mem;
goto err;
}

platform_set_drvdata(pdev, plcd);
platform_lcd_set_power(plcd->lcd, FB_BLANK_NORMAL);

return 0;

err_mem:
kfree(plcd);
err:
return err;
}

Expand All @@ -116,7 +116,6 @@ static int __devexit platform_lcd_remove(struct platform_device *pdev)
struct platform_lcd *plcd = platform_get_drvdata(pdev);

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

return 0;
}
Expand Down

0 comments on commit 1f88dff

Please sign in to comment.