Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[sfrench/cifs-2.6.git] / kernel / irq / proc.c
index 4d161c70ba558507dc9be80537a50215052bd52f..f6b3440f05bc50dbe68cdb7026e4e287e227b934 100644 (file)
@@ -62,7 +62,7 @@ static ssize_t irq_affinity_proc_write(struct file *file,
        if (!cpus_intersects(new_value, cpu_online_map))
                /* Special case for empty set - allow the architecture
                   code to set default SMP affinity. */
-               return irq_select_affinity(irq) ? -EINVAL : count;
+               return irq_select_affinity_usr(irq) ? -EINVAL : count;
 
        irq_set_affinity(irq, new_value);
 
@@ -243,7 +243,11 @@ void init_irq_proc(void)
        /*
         * Create entries for all existing IRQs.
         */
-       for_each_irq_desc(irq, desc)
+       for_each_irq_desc(irq, desc) {
+               if (!desc)
+                       continue;
+
                register_irq_proc(irq, desc);
+       }
 }