Skip to content

Commit

Permalink
EDAC, MCE: Fix edac_init_mce_inject error handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Borislav Petkov committed Nov 22, 2010
1 parent f570e1d commit df4b2a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/mce_amd_inj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit df4b2a3

Please sign in to comment.