Skip to content

Commit

Permalink
x86: Remove superfluous NULL pointer check in destroy_irq()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Ingo Molnar committed Aug 2, 2009
1 parent e25371d commit 25f6e89
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 25f6e89

Please sign in to comment.