Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346914
b: refs/heads/master
c: dae6ba4
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Dmitry Torokhov committed Oct 11, 2012
1 parent 424038f commit af3b329
Show file tree
Hide file tree
Showing 2 changed files with 3 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: ef8dee5cfe4df1091419e7d58b902e7e3d90b00e
refs/heads/master: dae6ba4ab797ed411fbde60ef5b5f6fbf13f0090
5 changes: 2 additions & 3 deletions trunk/drivers/input/misc/wm831x-on.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ static int __devinit wm831x_on_probe(struct platform_device *pdev)
int irq = wm831x_irq(wm831x, platform_get_irq(pdev, 0));
int ret;

wm831x_on = kzalloc(sizeof(struct wm831x_on), GFP_KERNEL);
wm831x_on = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_on),
GFP_KERNEL);
if (!wm831x_on) {
dev_err(&pdev->dev, "Can't allocate data\n");
return -ENOMEM;
Expand Down Expand Up @@ -120,7 +121,6 @@ static int __devinit wm831x_on_probe(struct platform_device *pdev)
err_input_dev:
input_free_device(wm831x_on->dev);
err:
kfree(wm831x_on);
return ret;
}

Expand All @@ -132,7 +132,6 @@ static int __devexit wm831x_on_remove(struct platform_device *pdev)
free_irq(irq, wm831x_on);
cancel_delayed_work_sync(&wm831x_on->work);
input_unregister_device(wm831x_on->dev);
kfree(wm831x_on);

return 0;
}
Expand Down

0 comments on commit af3b329

Please sign in to comment.