mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Luis Henriques <henrix@camandro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	Evan Wang <xswang@marvell.com>, Marcin Wojtas <mw@semihalf.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bus: mvebu-mbus: fix iounmap() in error path
Date: Fri, 18 Nov 2016 13:48:39 +0100	[thread overview]
Message-ID: <87twb59cns.fsf@free-electrons.com> (raw)
In-Reply-To: <20161116225445.30771-1-henrix@camandro.org> (Luis Henriques's message of "Wed, 16 Nov 2016 22:54:45 +0000")

Hi Luis,
 
 On mer., nov. 16 2016, Luis Henriques <henrix@camandro.org> wrote:

> This patch fixes the following Coccinelle error:
>
> ./drivers/bus/mvebu-mbus.c:1115:2-8: \
> 	ERROR: missing iounmap; ioremap on line 1108 \
> 	and execution via conditional on line 1113
>
> Although all mvebu_mbus_common_init() callers seem to actually use
> &mbus_state in the 1st argument, this is still a bug that could be
> triggered by future changes.
>
> Signed-off-by: Luis Henriques <henrix@camandro.org>

Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

and applied on mvebu/dt

Thanks,

Gregory

> ---
>  drivers/bus/mvebu-mbus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
> index c7f396903184..449466eff56f 100644
> --- a/drivers/bus/mvebu-mbus.c
> +++ b/drivers/bus/mvebu-mbus.c
> @@ -1111,7 +1111,7 @@ static int __init mvebu_mbus_common_init(struct mvebu_mbus_state *mbus,
>  
>  	mbus->sdramwins_base = ioremap(sdramwins_phys_base, sdramwins_size);
>  	if (!mbus->sdramwins_base) {
> -		iounmap(mbus_state.mbuswins_base);
> +		iounmap(mbus->mbuswins_base);
>  		return -ENOMEM;
>  	}
>  

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

      reply	other threads:[~2016-11-18 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 22:54 Luis Henriques
2016-11-18 12:48 ` Gregory CLEMENT [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=87twb59cns.fsf@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=arnd@arndb.de \
    --cc=ben.dooks@codethink.co.uk \
    --cc=henrix@camandro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mw@semihalf.com \
    --cc=xswang@marvell.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

Powered by JetHome