* [PATCH] x86: remove superfluous NULL pointer check in destroy_irq()
@ 2009-07-30 21:21 Bartlomiej Zolnierkiewicz
2009-08-02 19:41 ` [tip:x86/apic] x86: Remove " tip-bot for Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-30 21:21 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Dan Carpenter, corbet, eteo, Julia Lawall
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] 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>
Cc: corbet@lwn.net
Cc: eteo@redhat.com
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
arch/x86/kernel/apic/io_apic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: b/arch/x86/kernel/apic/io_apic.c
===================================================================
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3238,8 +3238,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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/apic] x86: Remove superfluous NULL pointer check in destroy_irq()
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
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Bartlomiej Zolnierkiewicz @ 2009-08-02 19:41 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, julia, hpa, mingo, bzolnier, eteo, corbet, error27,
tglx, mingo
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-02 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 21:21 [PATCH] x86: remove superfluous NULL pointer check in destroy_irq() Bartlomiej Zolnierkiewicz
2009-08-02 19:41 ` [tip:x86/apic] x86: Remove " tip-bot for Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox