aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/manage.c4
-rw-r--r--kernel/irq/proc.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 84a0a9c22226..550ae97a0040 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -73,8 +73,8 @@ int irq_can_set_affinity(unsigned int irq)
73{ 73{
74 struct irq_desc *desc = irq_to_desc(irq); 74 struct irq_desc *desc = irq_to_desc(irq);
75 75
76 if (!irqd_can_balance(&desc->irq_data) || !desc->irq_data.chip || 76 if (!desc || !irqd_can_balance(&desc->irq_data) ||
77 !desc->irq_data.chip->irq_set_affinity) 77 !desc->irq_data.chip || !desc->irq_data.chip->irq_set_affinity)
78 return 0; 78 return 0;
79 79
80 return 1; 80 return 1;
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index afe4e6803148..4cc2e5ed0bec 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -66,8 +66,7 @@ static ssize_t irq_affinity_proc_write(struct file *file,
66 cpumask_var_t new_value; 66 cpumask_var_t new_value;
67 int err; 67 int err;
68 68
69 if (!irq_to_desc(irq)->irq_data.chip->irq_set_affinity || no_irq_affinity || 69 if (!irq_can_set_affinity(irq) || no_irq_affinity)
70 irq_balancing_disabled(irq))
71 return -EIO; 70 return -EIO;
72 71
73 if (!alloc_cpumask_var(&new_value, GFP_KERNEL)) 72 if (!alloc_cpumask_var(&new_value, GFP_KERNEL))