Skip to content

Commit

Permalink
ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"
Browse files Browse the repository at this point in the history
commit 9ee8578 upstream.

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

Fixes: 1c459de ("ARM: pxa: ssp: use devm_ functions")
Signed-off-by: YueHaibing <[email protected]>
[ commit message spelling fix ]
Signed-off-by: Robert Jarzmik <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
  • Loading branch information
YueHaibing authored and bwhacks committed Sep 23, 2019
1 parent c4bea44 commit 3360c36
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions arch/arm/plat-pxa/ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,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);
Expand Down

0 comments on commit 3360c36

Please sign in to comment.