Browse Source

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>
Axel Lin 14 years ago
parent
commit
df4b2a30e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/edac/mce_amd_inj.c

+ 1 - 1
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);