Skip to content

Commit d882ba6

Browse files
mitatorvalds
authored andcommitted
s390: 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 s390. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1dee31f commit d882ba6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/s390/kernel/smp.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -944,21 +944,21 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
944944
struct cpu *c = &per_cpu(cpu_devices, cpu);
945945
struct sys_device *s = &c->sysdev;
946946
struct s390_idle_data *idle;
947+
int err = 0;
947948

948949
switch (action) {
949950
case CPU_ONLINE:
950951
case CPU_ONLINE_FROZEN:
951952
idle = &per_cpu(s390_idle, cpu);
952953
memset(idle, 0, sizeof(struct s390_idle_data));
953-
if (sysfs_create_group(&s->kobj, &cpu_online_attr_group))
954-
return NOTIFY_BAD;
954+
err = sysfs_create_group(&s->kobj, &cpu_online_attr_group);
955955
break;
956956
case CPU_DEAD:
957957
case CPU_DEAD_FROZEN:
958958
sysfs_remove_group(&s->kobj, &cpu_online_attr_group);
959959
break;
960960
}
961-
return NOTIFY_OK;
961+
return notifier_from_errno(err);
962962
}
963963

964964
static struct notifier_block __cpuinitdata smp_cpu_nb = {

0 commit comments

Comments
 (0)