From patchwork Tue Sep 24 03:35:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2931471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6904F9F289 for ; Tue, 24 Sep 2013 03:35:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7465203B4 for ; Tue, 24 Sep 2013 03:35:54 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B056D203AD for ; Tue, 24 Sep 2013 03:35:53 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOJPe-0005yL-RL; Tue, 24 Sep 2013 03:35:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOJPc-0001uA-Bh; Tue, 24 Sep 2013 03:35:44 +0000 Received: from mail-bk0-x22c.google.com ([2a00:1450:4008:c01::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOJPX-0001tR-Il for linux-arm-kernel@lists.infradead.org; Tue, 24 Sep 2013 03:35:42 +0000 Received: by mail-bk0-f44.google.com with SMTP id mz10so1503342bkb.31 for ; Mon, 23 Sep 2013 20:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=7Lj3wFexGyLIa0H/GH0AZzDbBeZSEV1IMfR/TZBzdto=; b=YfTw6pv0hkKU1rXZgFHsUr66V7WGMKvyrd60thFnKux178R+SiTvkQk+RnYn48Q3V1 edU7OXBbhIaF0pu9GIVJGiwFyZ8rCFbnMBPlbJlZ5+ZoQsd8XxTKMEQj5Y1murD4omUL 4GcalKdOoBIT7LvwmWuAVduooRy4+BC9/OHGGsOpLe0wM+dPjJi7RJKzwa0jwo8lvn4N DnUXBMikL0N5NMEPmZW6xMDJEOQPGHHqZPa8rBZwHPZranjal1KpBUX0su5+Z4a7IFIJ zIf2Vlm8ewdwTklqK+THPyJOsO+uG5x0v2NtHl50JKdBhdli07dtOjb+cuFIym0QKy/N /Q0A== MIME-Version: 1.0 X-Received: by 10.205.15.72 with SMTP id pt8mr20503126bkb.17.1379993716775; Mon, 23 Sep 2013 20:35:16 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Mon, 23 Sep 2013 20:35:16 -0700 (PDT) Date: Tue, 24 Sep 2013 11:35:16 +0800 Message-ID: Subject: [PATCH RESEND] ARM: pxa: ssp: remove kfree for memory allocated with devm_kzalloc From: Wei Yongjun To: linux@arm.linux.org.uk, grant.likely@linaro.org, rob.herring@calxeda.com, broonie@sirena.org.uk, haojian.zhuang@gmail.com, zonque@gmail.com, olof@lixom.net, gregkh@linuxfoundation.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130923_233539_756595_5EFBA80F X-CRM114-Status: GOOD ( 10.10 ) X-Spam-Score: -2.0 (--) Cc: yongjun_wei@trendmicro.com.cn, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free. Signed-off-by: Wei Yongjun Acked-by: Daniel Mack --- Correct Mark's mail address --- arch/arm/plat-pxa/ssp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index 3ea0290..528143e 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -250,7 +250,6 @@ static int pxa_ssp_remove(struct platform_device *pdev) list_del(&ssp->node); mutex_unlock(&ssp_lock); - kfree(ssp); return 0; }