ARM: pxa: ssp: remove unnessary free for devm_xxx
Subsystems (5)
PATCH v3 1/1 ARM: pxa: ssp: remove unnessary free for devm_xxx
A Coccinelle warning.
It's not necessary to free memory allocated with devm_xxx and using these free functions maybe lead to a double free that will corrupt the resource subsys. So, I just remove them.
---
In "[PATCH] ARM: pxa: ssp: remove unnessary free for devm_xxx", I forgot to remove an unused variable struct resource *res.
arch/arm/plat-pxa/ssp.c | 9 --------- 1 file changed, 9 deletions(-)
arch/arm/plat-pxa/ssp.c +0 -9
@@ -232,25 +232,16 @@ 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 ; -iounmap (ssp->mmio_base); - - 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); -kfree (ssp);return 0 ; }
Signature · 1 line
2.4.2
Sorry, please, ignore this patch.
I send it to the wrong receiver.
Quoted 46 lines · Firo Yang
A Coccinelle warning.
It's not necessary to free memory allocated withdevm_xxxand using these free functions maybe lead to a double free that will corrupt the resource subsys. So, I just remove them.Signed-off-by Firo Yang <[email protected]>---
In "[PATCH] ARM: pxa: ssp: remove unnessary free fordevm_xxx", I forgot to remove an unused variable struct resource *res.
arch/arm/plat-pxa/ssp.c| 9 ---------1 file changed, 9 deletions(-)arch/arm/plat-pxa/ssp.c +0
-9@@ -232,25 +232,16 @@ 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 ; -iounmap (ssp->mmio_base); - - 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); -kfree (ssp);return 0 ; }Signature · 1 line
2.4.2
PATCH v3 1/1 ARM: pxa: ssp: remove unnessary free for devm_xxx
In reply to Firo YangA Coccinelle warning.
It's not necessary to free memory allocated with devm_xxx and using these free functions maybe lead to a double free that will corrupt the resource subsys. So, I just remove them.
---
In "[PATCH] ARM: pxa: ssp: remove unnessary free for devm_xxx", I forgot to remove an unused variable struct resource *res.
arch/arm/plat-pxa/ssp.c | 9 --------- 1 file changed, 9 deletions(-)
arch/arm/plat-pxa/ssp.c +0 -9
@@ -232,25 +232,16 @@ 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 ; -iounmap (ssp->mmio_base); - - 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); -kfree (ssp);return 0 ; }
Signature · 1 line
2.4.2
Quoted 6 lines · Firo Yang
A Coccinelle warning.
It's not necessary to free memory allocated withdevm_xxxand using these free functions maybe lead to a double free that will corrupt the resource subsys. So, I just remove them.Signed-off-by Firo Yang <[email protected]>
Thanks!
Daniel
Quoted 38 lines
---
In "[PATCH] ARM: pxa: ssp: remove unnessary free fordevm_xxx", I forgot to remove an unused variable struct resource *res.arch/arm/plat-pxa/ssp.c | 9 --------- 1 file changed, 9 deletions(-)arch/arm/plat-pxa/ssp.c +0
-9@@ -232,25 +232,16 @@ 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 ; -iounmap (ssp->mmio_base); - - 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); -kfree (ssp);return 0 ; }