Commit 5d918cd2 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"

[ Upstream commit 9ee8578d ]

Since commit 1c459de1 ("ARM: pxa: ssp: use devm_ functions")
kfree, iounmap, clk_put etc are not needed anymore in remove path.

Fixes: 1c459de1 ("ARM: pxa: ssp: use devm_ functions")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
[ commit message spelling fix ]
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 10c588de
...@@ -183,18 +183,12 @@ static int pxa_ssp_probe(struct platform_device *pdev) ...@@ -183,18 +183,12 @@ static int pxa_ssp_probe(struct platform_device *pdev)
static int pxa_ssp_remove(struct platform_device *pdev) static int pxa_ssp_remove(struct platform_device *pdev)
{ {
struct resource *res;
struct ssp_device *ssp; struct ssp_device *ssp;
ssp = platform_get_drvdata(pdev); ssp = platform_get_drvdata(pdev);
if (ssp == NULL) if (ssp == NULL)
return -ENODEV; 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); mutex_lock(&ssp_lock);
list_del(&ssp->node); list_del(&ssp->node);
mutex_unlock(&ssp_lock); mutex_unlock(&ssp_lock);
......
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