From: Marc Zyngier <maz@kernel.org>
To: williamsukatube@163.com
Cc: tglx@linutronix.de, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org, tsbogend@alpha.franken.de,
fancer.lancer@gmail.com, William Dean <williamsukatube@gmail.com>,
Hacash Robot <hacashRobot@santino.com>
Subject: Re: [PATCH] irqchip: mips-gic: check the return value of ioremap() in gic_of_init()
Date: Fri, 22 Jul 2022 10:21:25 +0100 [thread overview]
Message-ID: <87mtd1y02y.wl-maz@kernel.org> (raw)
In-Reply-To: <20220722091008.2937238-1-williamsukatube@163.com>
On Fri, 22 Jul 2022 10:10:08 +0100,
williamsukatube@163.com wrote:
>
> From: William Dean <williamsukatube@gmail.com>
>
> The function ioremap() in gic_of_init() can fail, so
> its return value should be checked.
>
> Fixes: 4bdc0d676a643 ("remove ioremap_nocache and devm_ioremap_nocache")
Erm... No. The issue was definitely there before (just look at the
patch you quote here).
> Reported-by: Hacash Robot <hacashRobot@santino.com>
> Signed-off-by: William Dean <williamsukatube@gmail.com>
If sending from a different address, please add a SoB that matches the
address you are using.
> ---
> drivers/irqchip/irq-mips-gic.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
> index ff89b36267dd..a1f6d955794a 100644
> --- a/drivers/irqchip/irq-mips-gic.c
> +++ b/drivers/irqchip/irq-mips-gic.c
> @@ -734,6 +734,10 @@ static int __init gic_of_init(struct device_node *node,
> }
>
> mips_gic_base = ioremap(gic_base, gic_len);
> + if (!mips_gic_base) {
> + pr_err("Failed to ioremap gic_base\n");
> + return -ENOMEM;
> + }
>
> gicconfig = read_gic_config();
> gic_shared_intrs = FIELD_GET(GIC_CONFIG_NUMINTERRUPTS, gicconfig);
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-07-22 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 9:10 [PATCH] irqchip: mips-gic: check the return value of ioremap() in gic_of_init() williamsukatube
2022-07-22 9:21 ` Marc Zyngier [this message]
[not found] ` <CAK6EE7=AWA1fV6j7903V-PTFnUDa70itkbkxv7vBVNrRGAoV+w@mail.gmail.com>
2022-07-23 9:10 ` Marc Zyngier
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=87mtd1y02y.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=fancer.lancer@gmail.com \
--cc=hacashRobot@santino.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=williamsukatube@163.com \
--cc=williamsukatube@gmail.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).