Commit 3f8060a5 authored by Jingoo Han's avatar Jingoo Han Committed by Anton Vorontsov

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent f11d018f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment