2013-05-04 05:58:03

by Axel Lin

[permalink] [raw]
Subject: [PATCH] power_supply: wm831x_backup: Remove kfree call for devdata->backup.name

devdata->backup.name points to devdata->name, the memory for devdata->name is
part of struct wm831x_backup. Thus remove kfree call for devdata->backup.name.

Signed-off-by: Axel Lin <[email protected]>
---
drivers/power/wm831x_backup.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/power/wm831x_backup.c b/drivers/power/wm831x_backup.c
index 58cbb00..56fb509 100644
--- a/drivers/power/wm831x_backup.c
+++ b/drivers/power/wm831x_backup.c
@@ -207,7 +207,6 @@ static int wm831x_backup_remove(struct platform_device *pdev)
struct wm831x_backup *devdata = platform_get_drvdata(pdev);

power_supply_unregister(&devdata->backup);
- kfree(devdata->backup.name);

return 0;
}
--
1.8.1.2



2013-05-06 10:34:51

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] power_supply: wm831x_backup: Remove kfree call for devdata->backup.name

On Sat, May 04, 2013 at 01:57:55PM +0800, Axel Lin wrote:
> devdata->backup.name points to devdata->name, the memory for devdata->name is
> part of struct wm831x_backup. Thus remove kfree call for devdata->backup.name.

Acked-by: Mark Brown <[email protected]>


Attachments:
(No filename) (279.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-05-10 19:48:13

by Anton Vorontsov

[permalink] [raw]
Subject: Re: [PATCH] power_supply: wm831x_backup: Remove kfree call for devdata->backup.name

On Mon, May 06, 2013 at 11:34:48AM +0100, Mark Brown wrote:
> On Sat, May 04, 2013 at 01:57:55PM +0800, Axel Lin wrote:
> > devdata->backup.name points to devdata->name, the memory for devdata->name is
> > part of struct wm831x_backup. Thus remove kfree call for devdata->backup.name.
>
> Acked-by: Mark Brown <[email protected]>

Applied, thanks a lot!

Anton