mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yejune Deng <yejune.deng@gmail.com>
To: tglx@linutronix.de, maz@kernel.org
Cc: linux-kernel@vger.kernel.org, yejune.deng@gmail.com
Subject: [PATCH] irqchip/gic: remove a if in gic_of_setup()
Date: Wed, 30 Dec 2020 10:30:41 +0800	[thread overview]
Message-ID: <1609295441-36288-1-git-send-email-yejune.deng@gmail.com> (raw)

There is two function gic_of_init() and gic_of_init_child() called
gic_of_setup(),both gic and node never fail,so remove
if (!gic || !node) is safe.

Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
---
 drivers/irqchip/irq-gic.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index b1d9c22..a65678f0 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -1380,9 +1380,6 @@ static bool gic_check_eoimode(struct device_node *node, void __iomem **base)
 
 static int gic_of_setup(struct gic_chip_data *gic, struct device_node *node)
 {
-	if (!gic || !node)
-		return -EINVAL;
-
 	gic->raw_dist_base = of_iomap(node, 0);
 	if (WARN(!gic->raw_dist_base, "unable to map gic dist registers\n"))
 		goto error;
-- 
1.9.1


                 reply	other threads:[~2020-12-30  2:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1609295441-36288-1-git-send-email-yejune.deng@gmail.com \
    --to=yejune.deng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®