From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: dwmw2@infradead.org, computersforpeace@gmail.com,
marek.vasut@gmail.com, richard@nod.at,
cyrille.pitchen@wedev4u.fr, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mtd: physmap_of: Fix resources leak in 'of_flash_probe()'
Date: Thu, 17 Aug 2017 15:03:54 +0200 [thread overview]
Message-ID: <20170817150354.56cdd114@bbrezillon> (raw)
In-Reply-To: <20170806125501.10368-1-christophe.jaillet@wanadoo.fr>
Le Sun, 6 Aug 2017 14:55:01 +0200,
Christophe JAILLET <christophe.jaillet@wanadoo.fr> a écrit :
> If 'of_flash_probe_gemini()' or 'of_flash_probe_versatile()' fail, we must
> reslease some resources, as already done in all error handling paths in
> this function.
Applied to l2-mtd/master.
Thanks,
Boris
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/mtd/maps/physmap_of_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/maps/physmap_of_core.c b/drivers/mtd/maps/physmap_of_core.c
> index 62fa6836f218..2c8cc97ce019 100644
> --- a/drivers/mtd/maps/physmap_of_core.c
> +++ b/drivers/mtd/maps/physmap_of_core.c
> @@ -235,10 +235,10 @@ static int of_flash_probe(struct platform_device *dev)
>
> err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
> if (err)
> - return err;
> + goto err_out;
> err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
> if (err)
> - return err;
> + goto err_out;
>
> err = -ENOMEM;
> info->list[i].map.virt = ioremap(info->list[i].map.phys,
prev parent reply other threads:[~2017-08-17 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-06 12:55 [PATCH] mtd: physmap_of: Fix resources leak in 'of_flash_probe()' Christophe JAILLET
2017-08-17 13:03 ` Boris Brezillon [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=20170817150354.56cdd114@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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