aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index c2fb70d0286f..284d1de968bc 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1798,7 +1798,7 @@ static cpumask_var_t mce_dev_initialized;
1798static __cpuinit int mce_create_device(unsigned int cpu) 1798static __cpuinit int mce_create_device(unsigned int cpu)
1799{ 1799{
1800 int err; 1800 int err;
1801 int i; 1801 int i, j;
1802 1802
1803 if (!mce_available(&boot_cpu_data)) 1803 if (!mce_available(&boot_cpu_data))
1804 return -EIO; 1804 return -EIO;
@@ -1816,9 +1816,9 @@ static __cpuinit int mce_create_device(unsigned int cpu)
1816 if (err) 1816 if (err)
1817 goto error; 1817 goto error;
1818 } 1818 }
1819 for (i = 0; i < banks; i++) { 1819 for (j = 0; j < banks; j++) {
1820 err = sysdev_create_file(&per_cpu(mce_dev, cpu), 1820 err = sysdev_create_file(&per_cpu(mce_dev, cpu),
1821 &bank_attrs[i]); 1821 &bank_attrs[j]);
1822 if (err) 1822 if (err)
1823 goto error2; 1823 goto error2;
1824 } 1824 }
@@ -1826,8 +1826,8 @@ static __cpuinit int mce_create_device(unsigned int cpu)
1826 1826
1827 return 0; 1827 return 0;
1828error2: 1828error2:
1829 while (--i >= 0) 1829 while (--j >= 0)
1830 sysdev_remove_file(&per_cpu(mce_dev, cpu), &bank_attrs[i]); 1830 sysdev_remove_file(&per_cpu(mce_dev, cpu), &bank_attrs[j]);
1831error: 1831error:
1832 while (--i >= 0) 1832 while (--i >= 0)
1833 sysdev_remove_file(&per_cpu(mce_dev, cpu), mce_attrs[i]); 1833 sysdev_remove_file(&per_cpu(mce_dev, cpu), mce_attrs[i]);