public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: "Dasgupta, Romit" <romit@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	Ameya Palande <ameya.palande@nokia.com>,
	"Chitriki Rudramuni, Deepak" <deepak.chitriki@ti.com>,
	Felipe Contreras <felipe.contreras@nokia.com>,
	Hiroshi Doyu <hiroshi.doyu@nokia.com>,
	"Ramirez Luna, Omar" <omar.ramirez@ti.com>
Subject: Re: [PATCH 1/2] DSPBRIDGE: remove dependency of mpu freq
Date: Thu, 21 Jan 2010 01:42:30 -0600	[thread overview]
Message-ID: <4B580566.5070706@ti.com> (raw)
In-Reply-To: <4B5804E3.5030206@ti.com>

Dasgupta, Romit had written, on 01/21/2010 01:40 AM, the following:
> Romit Dasgupta wrote:
>>> 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 :
> missed the last part of the mail. If pdata->dsp_freq_table is NULL to start
> with. This is ok. Otherwise this needs to be changed.
;) yep it is NULL to start with as the same file passes pdata from:
static struct dspbridge_platform_data dspbridge_pdata __initdata
and kfree is NULL safe :D.

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2010-01-21  7:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 22:19 [PATCH 0/2] DSPBRIDGE: cleanup OPP handling Nishanth Menon
2010-01-20 22:19 ` [PATCH 1/2] DSPBRIDGE: remove dependency of mpu freq Nishanth Menon
2010-01-20 22:19   ` [PATCH 2/2] DSPBRIDGE: pm: use old implementation for opps Nishanth Menon
2010-01-20 22:19     ` [RFC] [PATCH 2/2] DSPBRIDGE: pm: use pm-wip-opp APIs for opp list Nishanth Menon
2010-01-21  7:58       ` Romit Dasgupta
2010-01-21  7:59         ` Nishanth Menon
2010-01-21  7:38     ` [PATCH 2/2] DSPBRIDGE: pm: use old implementation for opps Romit Dasgupta
2010-01-21  7:47       ` Nishanth Menon
2010-01-21  7:38   ` [PATCH 1/2] DSPBRIDGE: remove dependency of mpu freq Romit Dasgupta
2010-01-21  7:40     ` Romit Dasgupta
2010-01-21  7:42       ` Nishanth Menon [this message]
2010-01-21  7:45   ` Romit Dasgupta
2010-01-21  7:48     ` Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B580566.5070706@ti.com \
    --to=nm@ti.com \
    --cc=ameya.palande@nokia.com \
    --cc=deepak.chitriki@ti.com \
    --cc=felipe.contreras@nokia.com \
    --cc=hiroshi.doyu@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=romit@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox