[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1/4] xen/irq: irq_to_desc() can't return NULL



So NULL checks are logically dead code.

Coverity IDs: 1055247, 1087147

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
---
 xen/arch/x86/hvm/vmsi.c |    2 --
 xen/arch/x86/irq.c      |    2 --
 2 files changed, 4 deletions(-)

diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86/hvm/vmsi.c
index 4826b4a..b0766a4 100644
--- a/xen/arch/x86/hvm/vmsi.c
+++ b/xen/arch/x86/hvm/vmsi.c
@@ -304,8 +304,6 @@ static int msixtbl_write(struct vcpu *v, unsigned long 
address,
         goto out;
     
     desc = irq_to_desc(msi_desc->irq);
-    if ( !desc )
-        goto out;
 
     spin_lock_irqsave(&desc->lock, flags);
 
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index c61cc46..e6036ec 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -646,8 +646,6 @@ void irq_move_cleanup_interrupt(struct cpu_user_regs *regs)
             continue;
 
         desc = irq_to_desc(irq);
-        if (!desc)
-            continue;
 
         spin_lock(&desc->lock);
         if (!desc->arch.move_cleanup_count)
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.