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>
This commit is contained in:
parent
f570e1dd84
commit
df4b2a30e0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue