diff options
Diffstat (limited to 'arch/i386/kernel/microcode.c')
-rw-r--r-- | arch/i386/kernel/microcode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 9b9479768d5e..c4d0291b519f 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c | |||
@@ -656,14 +656,18 @@ static struct attribute_group mc_attr_group = { | |||
656 | 656 | ||
657 | static int mc_sysdev_add(struct sys_device *sys_dev) | 657 | static int mc_sysdev_add(struct sys_device *sys_dev) |
658 | { | 658 | { |
659 | int cpu = sys_dev->id; | 659 | int err, cpu = sys_dev->id; |
660 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 660 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
661 | 661 | ||
662 | if (!cpu_online(cpu)) | 662 | if (!cpu_online(cpu)) |
663 | return 0; | 663 | return 0; |
664 | |||
664 | pr_debug("Microcode:CPU %d added\n", cpu); | 665 | pr_debug("Microcode:CPU %d added\n", cpu); |
665 | memset(uci, 0, sizeof(*uci)); | 666 | memset(uci, 0, sizeof(*uci)); |
666 | sysfs_create_group(&sys_dev->kobj, &mc_attr_group); | 667 | |
668 | err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group); | ||
669 | if (err) | ||
670 | return err; | ||
667 | 671 | ||
668 | microcode_init_cpu(cpu); | 672 | microcode_init_cpu(cpu); |
669 | return 0; | 673 | return 0; |