Skip to content

Commit

Permalink
88pm860x_charger: Drop kfree of devm_kzalloc'd data
Browse files Browse the repository at this point in the history
The devm_kzalloc function allocates memory that is released automatically,
when a driver detaches. Thus, there is no reason to explicitly call kfree
in probe or remove functions.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
  • Loading branch information
Jingoo Han authored and Anton Vorontsov committed Apr 1, 2013
1 parent f11d018 commit 3f8060a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/power/88pm860x_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ static int pm860x_charger_probe(struct platform_device *pdev)
while (--i >= 0)
free_irq(info->irq[i], info);
out:
kfree(info);
return ret;
}

Expand All @@ -728,7 +727,6 @@ static int pm860x_charger_remove(struct platform_device *pdev)
free_irq(info->irq[0], info);
for (i = 0; i < info->irq_nums; i++)
free_irq(info->irq[i], info);
kfree(info);
return 0;
}

Expand Down

0 comments on commit 3f8060a

Please sign in to comment.