aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/power_supply_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 91606bb55318..f06bad047d76 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -190,10 +190,10 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
190 goto success; 190 goto success;
191 191
192create_triggers_failed: 192create_triggers_failed:
193 device_unregister(psy->dev); 193 device_del(dev);
194kobject_set_name_failed: 194kobject_set_name_failed:
195device_add_failed: 195device_add_failed:
196 kfree(dev); 196 put_device(dev);
197success: 197success:
198 return rc; 198 return rc;
199} 199}