Skip to contentSkip to conversation

power_supply: wm831x_backup: Remove kfree call for devdata->backup.name

PATCH Applied Axel Lin 3 participants 3 messages May 4, 2013 – May 10, 2013

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/power/wm831x_backup.c | 1 -
 1 file changed, 1 deletion(-)
drivers/power/wm831x_backup.c +0 -1
index 58cbb00..56fb509 100644
@@ -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;
 }
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Axel Lin

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.

#2 lore raw
Quoted 5 lines · Mark Brown
Quoted 2 lines · Axel Lin

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.

Applied, thanks a lot!

Anton