summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik2006-10-11 10:21:53 +0200
committerLinus Torvalds2006-10-11 20:14:22 +0200
commit2e3ad8af43c2f555c1be6c02581f6cc939dcb71c (patch)
treea45747a7a10cc336dca9e475a4d6254fbfe9e7da
parent[PATCH] invalidate_inode_pages2_range() debug (diff)
downloadkernel-qcow2-linux-2e3ad8af43c2f555c1be6c02581f6cc939dcb71c.tar.gz
kernel-qcow2-linux-2e3ad8af43c2f555c1be6c02581f6cc939dcb71c.tar.xz
kernel-qcow2-linux-2e3ad8af43c2f555c1be6c02581f6cc939dcb71c.zip
[PATCH] x86/microcode: handle sysfs error
Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/i386/kernel/microcode.c8
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 = {
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;