lkml.org 
[lkml]   [2017]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 33/52] x86/vector: Remove pointless pointer checks
The info pointer checks in assign_irq_vector_policy() are pointless because
the pointer cannot be NULL, otherwise the calling code would already crash.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/apic/vector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/arch/x86/kernel/apic/vector.c
===================================================================
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -254,7 +254,7 @@ static int assign_irq_vector_policy(int
struct irq_alloc_info *info,
struct irq_data *irqd)
{
- if (info && info->mask)
+ if (info->mask)
return assign_irq_vector(irq, apicd, info->mask, irqd);
if (node != NUMA_NO_NODE &&
assign_irq_vector(irq, apicd, cpumask_of_node(node), irqd) == 0)

\
 
 \ /
  Last update: 2017-09-13 23:41    [W:0.279 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site