[patch 33/52] x86/vector: Remove pointless pointer checks

Thomas Gleixner
2017-09-13T21:40:16Z

[-- Attachment #1: x86-vector--Remove-pointless-pointer-checks.patch --]
[-- Type: text/plain, Size: 814 bytes --]

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)