提交 df4b2a30 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册