Commit df4b2a30 authored by Axel Lin's avatar Axel Lin Committed by Borislav Petkov

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent f570e1dd
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment