From: Jeff Garzik Date: Wed, 11 Oct 2006 08:21:53 +0000 (-0700) Subject: [PATCH] x86/microcode: handle sysfs error X-Git-Tag: v2.6.19-rc2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e3ad8af43c2f555c1be6c02581f6cc939dcb71c;p=profile%2Fivi%2Fkernel-x86-ivi.git [PATCH] x86/microcode: handle sysfs error Signed-off-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 9b94797..c4d0291 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -656,14 +656,18 @@ static struct attribute_group mc_attr_group = { static int mc_sysdev_add(struct sys_device *sys_dev) { - int cpu = sys_dev->id; + int err, cpu = sys_dev->id; struct ucode_cpu_info *uci = ucode_cpu_info + cpu; if (!cpu_online(cpu)) return 0; + pr_debug("Microcode:CPU %d added\n", cpu); memset(uci, 0, sizeof(*uci)); - sysfs_create_group(&sys_dev->kobj, &mc_attr_group); + + err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group); + if (err) + return err; microcode_init_cpu(cpu); return 0;