linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Stoyan Gaydarov <sgayda2@uiuc.edu>
Cc: kay.sievers@vrfy.org, David.Woodhouse@intel.com, gregkh@suse.de,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	sr@denx.de
Subject: Re: [PATCH 2/4] [mtd] fixed faulty check
Date: Thu, 30 Jul 2009 13:27:12 +0200	[thread overview]
Message-ID: <4A718390.4080103@linutronix.de> (raw)
In-Reply-To: <1248949506-20827-1-git-send-email-sgayda2@uiuc.edu>

Stoyan Gaydarov wrote:
> This patche fixes a spelling error that has resulted from copy and pasting. The location of the error was found using a semantic patch but the semantic patch was not trying to find these errors. After looking things over it seemed logical that this change was needed. Please review it and then include the patch if it is in fact the correct change.
> 
> Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
> ---
>  drivers/mtd/maps/physmap_of.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
> index 39d357b..2cc0b0d 100644
> --- a/drivers/mtd/maps/physmap_of.c
> +++ b/drivers/mtd/maps/physmap_of.c
> @@ -215,7 +215,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
>  		goto err_out;
>  
>  	mtd_list = kzalloc(sizeof(struct mtd_info) * count, GFP_KERNEL);
> -	if (!info)
> +	if (!mtd_list)
>  		goto err_out;
>  
>  	dev_set_drvdata(&dev->dev, info);
Yes, !mtd_list should be checked instead of !info. This is correct. 
However in error case you have to free info as well.
Can please make another patch?

Sebastian

      reply	other threads:[~2009-07-30 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 10:25 [PATCH 2/4] [mtd] fixed faulty check Stoyan Gaydarov
2009-07-30 11:27 ` Sebastian Andrzej Siewior [this message]

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=4A718390.4080103@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=David.Woodhouse@intel.com \
    --cc=gregkh@suse.de \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sgayda2@uiuc.edu \
    --cc=sr@denx.de \
    /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;
as well as URLs for NNTP newsgroup(s).