Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4380527imu; Tue, 29 Jan 2019 00:05:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN5LuqYzRVsGSsj1og+wVd6WV0wreg3LvaUW8+AmYJMxdktBRPSUltOeGwEY0ajKaEJqW8Kq X-Received: by 2002:a17:902:e290:: with SMTP id cf16mr25574253plb.81.1548749132564; Tue, 29 Jan 2019 00:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548749132; cv=none; d=google.com; s=arc-20160816; b=XJEiHBODMxL6/ktmNMO7C6RyJUHUNnkzyWJ0BC11KNKjqbxUF3yEaefz66DKO2mdwW SFucVbfVMnDWu5y7wgOHTwNmcnQp7sCwzrNVeN64w7cxEfa9R7/QbrqDrzMCUBOYyiqw 7ayqj+xhWxZyc8L+TBcwsjzwrkhfG1MincP6THRrbpe5IRb9Fr5g+vpgFbqET81PGzse ha3YnUgec828JbBOYbNMB27lFWb1Ka1E7PeKF1oJ4AlSPfhUlxUAZNBt0iMg5K7Lg4Sp JcAFDCIByxcN0lAmoUMV/4dJoeQb32sPSz0Po0d+OCiTnr83F8hitqZU4YGfAoqNOE7k KlBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=WWwMwanKLSpfMoHjREWnQoO/JwIr/Dw7PgdO73DwwzQ=; b=ZRUpm6Mp99dEZ1dkvyL5hil9/JyY7UnP8oVk9/wk9a6A07AA7LesKS2wIozSkd+QXj 3eu9ASEFy7aVrFfT8R875HasmxzZckQ54wto5e/Oc9J9SXO+3nThuSPaUr1k0/crcsOb 67hY6zWdT+cpGDsnq+LA0RNu/UaMyCwgESqsohgqO2dFTVEite38LKWIw3wf/9kyMsmh nS2QCtNv1+TA2fKXabGwHBZnnnGcXaWuQ6wujC0zJ6Ec2PE6wcsC0coAiA9M/1ED4lHw XtwsjLNslwWNcfG/ePPw6ct8uK9n83SQzwmRxzSTDCJNBUcUseW+Uj5c5PS5dtGFObE8 DKJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c132si34016504pga.597.2019.01.29.00.05.15; Tue, 29 Jan 2019 00:05:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726072AbfA2IDj (ORCPT + 99 others); Tue, 29 Jan 2019 03:03:39 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:44322 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725355AbfA2IDj (ORCPT ); Tue, 29 Jan 2019 03:03:39 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C68E3FC3369BE29B3C71; Tue, 29 Jan 2019 16:03:37 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.408.0; Tue, 29 Jan 2019 16:03:28 +0800 From: YueHaibing To: , , CC: , , YueHaibing Subject: [PATCH -next] ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data" Date: Tue, 29 Jan 2019 16:03:24 +0800 Message-ID: <20190129080324.18708-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 1c459de1e645 ("ARM: pxa: ssp: use devm_ functions") kfree, iounmap, clk_put etc no need do any more in remove path. Fixes: 1c459de1e645 ("ARM: pxa: ssp: use devm_ functions") Signed-off-by: YueHaibing --- arch/arm/plat-pxa/ssp.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index ed36dca..bf25f78 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -183,25 +183,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; } -- 2.7.0