From patchwork Thu Jun 13 14:17:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 2717011 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 81D28C1459 for ; Thu, 13 Jun 2013 14:18:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76E7920298 for ; Thu, 13 Jun 2013 14:18:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3BEF520256 for ; Thu, 13 Jun 2013 14:18:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753358Ab3FMOR4 (ORCPT ); Thu, 13 Jun 2013 10:17:56 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:57153 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755945Ab3FMORy (ORCPT ); Thu, 13 Jun 2013 10:17:54 -0400 Received: from dbdlxv05.itg.ti.com ([172.24.171.60]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5DEHS6q019339; Thu, 13 Jun 2013 09:17:28 -0500 Received: from DBDE73.ent.ti.com (dbde73.ent.ti.com [172.24.171.98]) by dbdlxv05.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5DEHOBM015906; Thu, 13 Jun 2013 09:17:25 -0500 Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE73.ent.ti.com (172.24.171.98) with Microsoft SMTP Server id 14.2.342.3; Thu, 13 Jun 2013 22:17:23 +0800 Received: from ula0131687.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5DEHMqp002213; Thu, 13 Jun 2013 19:47:24 +0530 From: Rajendra Nayak To: CC: , , Rajendra Nayak Subject: [PATCH v2 3/3] ARM: OMAP: dma: Remove the erroneous freeing of platform data Date: Thu, 13 Jun 2013 19:47:11 +0530 Message-ID: <1371133031-29229-4-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371133031-29229-1-git-send-email-rnayak@ti.com> References: <1371133031-29229-1-git-send-email-rnayak@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Given p = pdev->dev.platform_data; and d = p->dma_attr; the freeing of either one of these by the driver seems just plain wrong. Get rid of them in the .probe failure path as well as the .remove. Signed-off-by: Rajendra Nayak --- arch/arm/plat-omap/dma.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 8a71f75..4d463ca 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -2111,8 +2111,6 @@ exit_dma_irq_fail: } exit_dma_lch_fail: - kfree(p); - kfree(d); kfree(dma_chan); return ret; } @@ -2133,8 +2131,6 @@ static int omap_system_dma_remove(struct platform_device *pdev) free_irq(dma_irq, (void *)(irq_rel + 1)); } } - kfree(p); - kfree(d); kfree(dma_chan); return 0; }