Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373579
b: refs/heads/master
c: 482467a
h: refs/heads/master
i:
  373577: 7cb783a
  373575: 65629fa
v: v3
  • Loading branch information
Jingoo Han authored and Thierry Reding committed Mar 8, 2013
1 parent 247e6ea commit 3aa070e
Show file tree
Hide file tree
Showing 2 changed files with 3 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: c791126b93e800c68557483235321b201c082910
refs/heads/master: 482467ad97b633b28f57c347440d97c108dc4bfb
7 changes: 2 additions & 5 deletions trunk/drivers/pwm/pwm-ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
* Nothing to be done in probe, this is required to get the
* device which is required for ab8500 read and write
*/
ab8500 = kzalloc(sizeof(*ab8500), GFP_KERNEL);
ab8500 = devm_kzalloc(&pdev->dev, sizeof(*ab8500), GFP_KERNEL);
if (ab8500 == NULL) {
dev_err(&pdev->dev, "failed to allocate memory\n");
return -ENOMEM;
Expand All @@ -111,10 +111,8 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
ab8500->chip.npwm = 1;

err = pwmchip_add(&ab8500->chip);
if (err < 0) {
kfree(ab8500);
if (err < 0)
return err;
}

dev_dbg(&pdev->dev, "pwm probe successful\n");
platform_set_drvdata(pdev, ab8500);
Expand All @@ -132,7 +130,6 @@ static int ab8500_pwm_remove(struct platform_device *pdev)
return err;

dev_dbg(&pdev->dev, "pwm driver removed\n");
kfree(ab8500);

return 0;
}
Expand Down

0 comments on commit 3aa070e

Please sign in to comment.