88pm860x_charger: Drop kfree of devm_kzalloc'd data

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>
This commit is contained in:
Jingoo Han 2013-03-11 15:30:40 +09:00 committed by Anton Vorontsov
parent f11d018fd6
commit 3f8060a5fe

View File

@ -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;
}
@ -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;
}