All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: andrew@lunn.ch, jg1.han@samsung.com,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	ezequiel.garcia@free-electrons.com, dwmw2@infradead.org
Subject: Re: [PATCH v2] mtd: orion_nand: fix error code path in probe
Date: Wed, 22 Oct 2014 01:49:44 -0700	[thread overview]
Message-ID: <20141022084944.GK16128@brian-ubuntu> (raw)
In-Reply-To: <1413435515-12134-1-git-send-email-michael.opdenacker@free-electrons.com>

On Thu, Oct 16, 2014 at 06:58:35AM +0200, Michael Opdenacker wrote:
> This replaces kzalloc() and ioremap() calls by devm_ functions
> in the probe() routine, which automatically release the corresponding
> resources when probe() fails or when the device is removed.
> 
> This simplifies simplifies the error management code, and brings
> the below improvements or changes:
> 
> A. Fixing a bug reported by "make coccicheck":
> 
> If "board = devm_kzalloc()" fails, the probe() function jumps
> incorrectly to label "no_res" and therefore returns without
> running iounmap().
> 
> B. Requesting the memory region
> 
> Using devm_ioremap_resource() makes the probe() function request
> the corresponding memory region before running ioremap(), as
> it is supposed to do.
> 
> C. Standardizing the error codes:
> 
> The use of devm_ioremap_resource() changes the return value:
>  * -ENOMEM instead of -EIO in case of ioremap() failure,
>  * -EINVAL instead of -ENODEV in case of platform_get_resource()
>    failure.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>

Pushed to l2-mtd.git. Thanks!

Brian

WARNING: multiple messages have this Message-ID (diff)
From: Brian Norris <computersforpeace@gmail.com>
To: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: andrew@lunn.ch, ezequiel.garcia@free-electrons.com,
	dwmw2@infradead.org, jg1.han@samsung.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mtd: orion_nand: fix error code path in probe
Date: Wed, 22 Oct 2014 01:49:44 -0700	[thread overview]
Message-ID: <20141022084944.GK16128@brian-ubuntu> (raw)
In-Reply-To: <1413435515-12134-1-git-send-email-michael.opdenacker@free-electrons.com>

On Thu, Oct 16, 2014 at 06:58:35AM +0200, Michael Opdenacker wrote:
> This replaces kzalloc() and ioremap() calls by devm_ functions
> in the probe() routine, which automatically release the corresponding
> resources when probe() fails or when the device is removed.
> 
> This simplifies simplifies the error management code, and brings
> the below improvements or changes:
> 
> A. Fixing a bug reported by "make coccicheck":
> 
> If "board = devm_kzalloc()" fails, the probe() function jumps
> incorrectly to label "no_res" and therefore returns without
> running iounmap().
> 
> B. Requesting the memory region
> 
> Using devm_ioremap_resource() makes the probe() function request
> the corresponding memory region before running ioremap(), as
> it is supposed to do.
> 
> C. Standardizing the error codes:
> 
> The use of devm_ioremap_resource() changes the return value:
>  * -ENOMEM instead of -EIO in case of ioremap() failure,
>  * -EINVAL instead of -ENODEV in case of platform_get_resource()
>    failure.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>

Pushed to l2-mtd.git. Thanks!

Brian

  parent reply	other threads:[~2014-10-22  8:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14 14:16 [PATCH] mtd: orion_nand: fix error code path in probe Michael Opdenacker
2014-10-14 14:16 ` Michael Opdenacker
2014-10-14 21:35 ` Andrew Lunn
2014-10-14 21:35   ` Andrew Lunn
2014-10-15 21:39   ` Ezequiel Garcia
2014-10-15 21:39     ` Ezequiel Garcia
2014-10-16  4:43     ` Michael Opdenacker
2014-10-16  4:43       ` Michael Opdenacker
2014-10-16  4:58       ` [PATCH v2] " Michael Opdenacker
2014-10-16  4:58         ` Michael Opdenacker
2014-10-16  7:39         ` Jingoo Han
2014-10-16  7:39           ` Jingoo Han
2014-10-18 19:35         ` Andrew Lunn
2014-10-18 19:35           ` Andrew Lunn
2014-10-22  8:49         ` Brian Norris [this message]
2014-10-22  8:49           ` Brian Norris
2014-10-16  5:06   ` [PATCH] " Michael Opdenacker
2014-10-16  5:06     ` Michael Opdenacker

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=20141022084944.GK16128@brian-ubuntu \
    --to=computersforpeace@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael.opdenacker@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.