mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 02:14:58 +00:00
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:
parent
f11d018fd6
commit
3f8060a5fe
@ -714,7 +714,6 @@ out_irq:
|
|||||||
while (--i >= 0)
|
while (--i >= 0)
|
||||||
free_irq(info->irq[i], info);
|
free_irq(info->irq[i], info);
|
||||||
out:
|
out:
|
||||||
kfree(info);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,7 +727,6 @@ static int pm860x_charger_remove(struct platform_device *pdev)
|
|||||||
free_irq(info->irq[0], info);
|
free_irq(info->irq[0], info);
|
||||||
for (i = 0; i < info->irq_nums; i++)
|
for (i = 0; i < info->irq_nums; i++)
|
||||||
free_irq(info->irq[i], info);
|
free_irq(info->irq[i], info);
|
||||||
kfree(info);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user