From mboxrd@z Thu Jan 1 00:00:00 1970 From: Romit Dasgupta Subject: Re: [PATCH 1/2] DSPBRIDGE: remove dependency of mpu freq Date: Thu, 21 Jan 2010 13:08:23 +0530 Message-ID: <4B58046F.5050802@ti.com> References: <1264025953-4620-1-git-send-email-nm@ti.com> <1264025953-4620-2-git-send-email-nm@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from bear.ext.ti.com ([192.94.94.41]:50408 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754703Ab0AUHid (ORCPT ); Thu, 21 Jan 2010 02:38:33 -0500 In-Reply-To: <1264025953-4620-2-git-send-email-nm@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Menon, Nishanth" Cc: linux-omap , Ameya Palande , "Chitriki Rudramuni, Deepak" , Felipe Contreras , Hiroshi Doyu , "Ramirez Luna, Omar" > > diff --git a/arch/arm/mach-omap2/dspbridge.c b/arch/arm/mach-omap2/dspbridge.c > + > static int __init dspbridge_init(void) > { > struct platform_device *pdev; > @@ -48,6 +65,10 @@ static int __init dspbridge_init(void) > if (!pdev) > goto err_out; > > + err = get_opp_table(pdata); > + if (err) > + goto err_out; > + > err = platform_device_add_data(pdev, pdata, sizeof(*pdata)); > if (err) > goto err_out; > @@ -60,6 +81,10 @@ static int __init dspbridge_init(void) > return 0; > > err_out: > + kfree(pdata->mpu_speeds); > + kfree(pdata->dsp_freq_table); Are we sure that pdata->dsp_freq_table is NULL before initialization? Looking at your second part of the patch. You seem to invoke kfree for pdata->dsp_freq_table even if pdata->dsp_freq_table is not allocated. So my question is :