mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"
[ Upstream commit9ee8578d95] Since commit1c459de1e6("ARM: pxa: ssp: use devm_ functions") kfree, iounmap, clk_put etc are not needed anymore in remove path. Fixes:1c459de1e6("ARM: pxa: ssp: use devm_ functions") Signed-off-by: YueHaibing <yuehaibing@huawei.com> [ commit message spelling fix ] Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
10c588de85
commit
5d918cd203
@@ -183,18 +183,12 @@ static int pxa_ssp_probe(struct platform_device *pdev)
|
||||
|
||||
static int pxa_ssp_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
struct ssp_device *ssp;
|
||||
|
||||
ssp = platform_get_drvdata(pdev);
|
||||
if (ssp == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
|
||||
clk_put(ssp->clk);
|
||||
|
||||
mutex_lock(&ssp_lock);
|
||||
list_del(&ssp->node);
|
||||
mutex_unlock(&ssp_lock);
|
||||
|
||||
Reference in New Issue
Block a user