public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Ruslan V. Sushko" <rsushko@ru.mvista.com>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: linux-mtd@lists.infradead.org, Vitaly Wool <vwool@ru.mvista.com>
Subject: Re: [PATCH] NAND Flash support for Intel IXP4xx platform
Date: Tue, 24 Apr 2007 12:29:12 +0400	[thread overview]
Message-ID: <462DBFD8.1080906@ru.mvista.com> (raw)
In-Reply-To: <acd2a5930704240021y7badb098ybc2b5b04f5b7daeb@mail.gmail.com>

Vitaly Wool wrote:
>> >> +
>> >> +    /* Register the partitions */
>> >> +    err = add_mtd_partitions(ixp4xx_mtd, ixp4xx_nand_parts,
>> >> nb_of_parts);
>> >> +    if (err)  {
>> >> +        printk(KERN_ERR "Failed to add MTD partitions\n");
>> >> +        if ( ixp4xx_nand_parts != plat->parts )
>> >> +        kfree(ixp4xx_nand_parts);
>> >>
>> > Wrong indentation.
>> > Moreover, if the number of partitions obtained by parse_mtd_partitions
>> > is the same as the one provided by platform data, you'll get leakage
>> > here.
>> how this can happens? Please describe.
>
> Suppose that the number of partitions obtained by parse_mtd_partitions
> is the same as configured statically. If add_mtd_partitions fails,
> ixp4xx_nand_parts != plat->parts is false and kfree won't be called.
>
> Vitaly
It's impossible because ixp4xx_nand_parts and plat->parts hold pointers 
to mtd_partions structure, not number of partions. Number of partitions 
held in nb_of_parts variable.

Thank you,
Ruslan

  reply	other threads:[~2007-04-24  8:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-19 10:29 [PATCH] NAND Flash support for Intel IXP4xx platform Ruslan V. Sushko
2007-04-20  8:25 ` Vitaly Wool
2007-04-20 14:16   ` Ruslan V. Sushko
2007-04-24  7:21     ` Vitaly Wool
2007-04-24  8:29       ` Ruslan V. Sushko [this message]
2007-04-24  8:34         ` Vitaly Wool
2007-04-24 10:33   ` Ruslan V. Sushko
2007-04-24 10:38     ` Lennert Buytenhek
2007-04-24 10:46       ` Ruslan V. Sushko
2007-04-24 10:49         ` Lennert Buytenhek
2007-04-24 10:53           ` Vitaly Wool
2007-04-24 11:01             ` Lennert Buytenhek
2007-04-24 11:10               ` Ruslan V. Sushko
2007-04-24 11:21               ` Vitaly Wool

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=462DBFD8.1080906@ru.mvista.com \
    --to=rsushko@ru.mvista.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vitalywool@gmail.com \
    --cc=vwool@ru.mvista.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