All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, julia@diku.dk, hpa@zytor.com,
	mingo@redhat.com, bzolnier@gmail.com, eteo@redhat.com,
	corbet@lwn.net, error27@gmail.com, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:x86/apic] x86: Remove superfluous NULL pointer check in destroy_irq()
Date: Sun, 2 Aug 2009 19:41:08 GMT	[thread overview]
Message-ID: <tip-25f6e89bedd29cc49bfa0d55497e91a671b9ae6e@git.kernel.org> (raw)
In-Reply-To: <200907302321.19086.bzolnier@gmail.com>

Commit-ID:  25f6e89bedd29cc49bfa0d55497e91a671b9ae6e
Gitweb:     http://git.kernel.org/tip/25f6e89bedd29cc49bfa0d55497e91a671b9ae6e
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Thu, 30 Jul 2009 23:21:18 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 2 Aug 2009 21:37:00 +0200

x86: Remove superfluous NULL pointer check in destroy_irq()

This takes care of the following entry from Dan's list:

  arch/x86/kernel/apic/io_apic.c +3241 destroy_irq(11) warning: variable derefenced before check 'desc'

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Eugene Teo <eteo@redhat.com>
Cc: Julia Lawall <julia@diku.dk>
LKML-Reference: <200907302321.19086.bzolnier@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/kernel/apic/io_apic.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index cf51b0b..7e92a92 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3185,8 +3185,7 @@ void destroy_irq(unsigned int irq)
 	cfg = desc->chip_data;
 	dynamic_irq_cleanup(irq);
 	/* connect back irq_cfg */
-	if (desc)
-		desc->chip_data = cfg;
+	desc->chip_data = cfg;
 
 	free_irte(irq);
 	spin_lock_irqsave(&vector_lock, flags);

      reply	other threads:[~2009-08-02 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 21:21 [PATCH] x86: remove superfluous NULL pointer check in destroy_irq() Bartlomiej Zolnierkiewicz
2009-08-02 19:41 ` tip-bot for Bartlomiej Zolnierkiewicz [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=tip-25f6e89bedd29cc49bfa0d55497e91a671b9ae6e@git.kernel.org \
    --to=bzolnier@gmail.com \
    --cc=corbet@lwn.net \
    --cc=error27@gmail.com \
    --cc=eteo@redhat.com \
    --cc=hpa@zytor.com \
    --cc=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.