summaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-11-18 22:05:43 -0500
committerBorislav Petkov <borislav.petkov@amd.com>2010-11-22 15:35:32 +0100
commitdf4b2a30e0b9e553abfd63ee75dbbd66be80f01a (patch)
treed6879b023bfe3ee94b03a86aec55741aa448fc2a /drivers/edac
parentf570e1dd8469d39420f406a4f5442c270b1e759e (diff)
downloadlinux-df4b2a30e0b9e553abfd63ee75dbbd66be80f01a.tar.gz
linux-df4b2a30e0b9e553abfd63ee75dbbd66be80f01a.tar.bz2
linux-df4b2a30e0b9e553abfd63ee75dbbd66be80f01a.zip
EDAC, MCE: Fix edac_init_mce_inject error handling
Otherwise, variable i will be -1 inside the latest iteration of the while loop. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/mce_amd_inj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c
index 8d0688f36d4c..39faded3cadd 100644
--- a/drivers/edac/mce_amd_inj.c
+++ b/drivers/edac/mce_amd_inj.c
@@ -139,7 +139,7 @@ static int __init edac_init_mce_inject(void)
return 0;
err_sysfs_create:
- while (i-- >= 0)
+ while (--i >= 0)
sysfs_remove_file(mce_kobj, &sysfs_attrs[i]->attr);
kobject_del(mce_kobj);