From: Greg Ungerer <gerg@linux-m68k.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
geert@linux-m68k.org, bhelgaas@google.com,
lorenzo.pieralisi@arm.com
Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] m68k/PCI: Fix a memory leak in an error handling path
Date: Tue, 21 Apr 2020 17:12:34 +1000 [thread overview]
Message-ID: <3a465332-532b-00f1-bca0-4ead5228ebd9@linux-m68k.org> (raw)
In-Reply-To: <20200418070751.25420-1-christophe.jaillet@wanadoo.fr>
Hi Christophe,
On 18/4/20 5:07 pm, Christophe JAILLET wrote:
> If 'ioremap' fails, we must free 'bridge', as done in other error handling
> path bellow.
>
> Fixes: 19cc4c843f40 ("m68k/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Looks good, thanks.
I will queue this in the for-next branch of the m68knommu tree.
Regards
Greg
> ---
> arch/m68k/coldfire/pci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/m68k/coldfire/pci.c b/arch/m68k/coldfire/pci.c
> index 62b0eb6cf69a..84eab0f5e00a 100644
> --- a/arch/m68k/coldfire/pci.c
> +++ b/arch/m68k/coldfire/pci.c
> @@ -216,8 +216,10 @@ static int __init mcf_pci_init(void)
>
> /* Keep a virtual mapping to IO/config space active */
> iospace = (unsigned long) ioremap(PCI_IO_PA, PCI_IO_SIZE);
> - if (iospace == 0)
> + if (iospace == 0) {
> + pci_free_host_bridge(bridge);
> return -ENODEV;
> + }
> pr_info("Coldfire: PCI IO/config window mapped to 0x%x\n",
> (u32) iospace);
>
>
next prev parent reply other threads:[~2020-04-21 7:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 7:07 [PATCH] m68k/PCI: Fix a memory leak in an error handling path Christophe JAILLET
2020-04-20 7:08 ` Geert Uytterhoeven
2020-04-21 7:12 ` Greg Ungerer [this message]
2020-04-18 20:00 Markus Elfring
2020-04-18 20:55 ` Christophe JAILLET
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=3a465332-532b-00f1-bca0-4ead5228ebd9@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=bhelgaas@google.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=geert@linux-m68k.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=lorenzo.pieralisi@arm.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;
as well as URLs for NNTP newsgroup(s).