Skip to content

Commit 92e99a9

Browse files
mitatorvalds
authored andcommitted
iucv: convert cpu notifier to return encapsulate errno value
By the previous modification, the cpu notifier can return encapsulate errno value. This converts the cpu notifiers for iucv. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent eac4068 commit 92e99a9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎net/iucv/iucv.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,13 +632,14 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
632632
iucv_irq_data[cpu] = kmalloc_node(sizeof(struct iucv_irq_data),
633633
GFP_KERNEL|GFP_DMA, cpu_to_node(cpu));
634634
if (!iucv_irq_data[cpu])
635-
return NOTIFY_BAD;
635+
return notifier_from_errno(-ENOMEM);
636+
636637
iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param),
637638
GFP_KERNEL|GFP_DMA, cpu_to_node(cpu));
638639
if (!iucv_param[cpu]) {
639640
kfree(iucv_irq_data[cpu]);
640641
iucv_irq_data[cpu] = NULL;
641-
return NOTIFY_BAD;
642+
return notifier_from_errno(-ENOMEM);
642643
}
643644
iucv_param_irq[cpu] = kmalloc_node(sizeof(union iucv_param),
644645
GFP_KERNEL|GFP_DMA, cpu_to_node(cpu));
@@ -647,7 +648,7 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
647648
iucv_param[cpu] = NULL;
648649
kfree(iucv_irq_data[cpu]);
649650
iucv_irq_data[cpu] = NULL;
650-
return NOTIFY_BAD;
651+
return notifier_from_errno(-ENOMEM);
651652
}
652653
break;
653654
case CPU_UP_CANCELED:
@@ -677,7 +678,7 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
677678
cpu_clear(cpu, cpumask);
678679
if (cpus_empty(cpumask))
679680
/* Can't offline last IUCV enabled cpu. */
680-
return NOTIFY_BAD;
681+
return notifier_from_errno(-EINVAL);
681682
smp_call_function_single(cpu, iucv_retrieve_cpu, NULL, 1);
682683
if (cpus_empty(iucv_irq_cpumask))
683684
smp_call_function_single(first_cpu(iucv_buffer_cpumask),

0 commit comments

Comments
 (0)