public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jhnikula@gmail.com>
To: shubhrajyoti@ti.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 ] McBSP: Fix the free variable update at remove
Date: Wed, 3 Nov 2010 11:28:06 +0200	[thread overview]
Message-ID: <20101103112806.c2cfe3d7.jhnikula@gmail.com> (raw)
In-Reply-To: <1288695814-8915-1-git-send-email-shubhrajyoti@ti.com>

On Tue,  2 Nov 2010 16:33:34 +0530
shubhrajyoti@ti.com wrote:

> From: Shubhrajyoti D <shubhrajyoti@ti.com>
> 
> At remove the free variable is wrongly updated.Attempting to solve the same.
> 
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> Reported-by: Vikram Pandita <vikram.pandita@ti.com>
> ---
> -[v2] Instead of using 0/1 use true/false
>  arch/arm/plat-omap/mcbsp.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
...
> @@ -1845,7 +1845,7 @@ static int __devexit omap_mcbsp_remove(struct
platform_device *pdev)
>  
>  		mcbsp->fclk = NULL;
>  		mcbsp->iclk = NULL;
> -		mcbsp->free = 0;
> +		mcbsp->free = true;
>  		mcbsp->dev = NULL;
>  	}
>  
While reviewing this I noticed that mcbsp->free is not problem at all
but the memory leak as there is no kfree(mcbsp) here and clk_disables
looked suspicious too.

I sent a patch fixing these and your patch changing to use true/false
flags with mcbsp->free looks worth to do as well. Care to send an
updated patch on top of mine (i.e no changes to omap_mcbsp_remove
reguired)?


-- 
Jarkko

  reply	other threads:[~2010-11-03  9:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 11:03 [PATCH v2 ] McBSP: Fix the free variable update at remove shubhrajyoti
2010-11-03  9:28 ` Jarkko Nikula [this message]
2010-11-03  9:40   ` Datta, Shubhrajyoti
  -- strict thread matches above, loose matches on Subject: below --
2010-11-02 10:24 [PATCH v2] " shubhrajyoti
2010-11-02 10:32 ` Jarkko Nikula
2010-11-02 11:05   ` Datta, Shubhrajyoti
2010-11-02 10:34 ` Varadarajan, Charulatha

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=20101103112806.c2cfe3d7.jhnikula@gmail.com \
    --to=jhnikula@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=shubhrajyoti@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