Message ID | 1546060206-97556-1-git-send-email-peng.hao2@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] arm/common/dmabounce : NULL check before dma_pool_destroy | expand |
Peng Hao <peng.hao2@zte.com.cn> writes: > devm_ allocated data will be automatically freed. The free > of devm_ allocated data is invalid. > > Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Hi Peng Hao, Thanks for the patch. I changed your title to fit my tree, ie. : "ARM: pxa: ssp: unneeded to free devm_ allocated data" If you have other patches please check what is the commit subject's prefix for the file(s) you're touching. Queued to pxa/fixes. Cheers.
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index ed36dca..f519199 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -190,8 +190,6 @@ static int pxa_ssp_remove(struct platform_device *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)); @@ -201,7 +199,6 @@ static int pxa_ssp_remove(struct platform_device *pdev) list_del(&ssp->node); mutex_unlock(&ssp_lock); - kfree(ssp); return 0; }
devm_ allocated data will be automatically freed. The free of devm_ allocated data is invalid. Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> --- arch/arm/plat-pxa/ssp.c | 3 --- 1 file changed, 3 deletions(-)