EDAC, MCE: Fix edac_init_mce_inject error handling
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/edac/mce_amd_inj.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/mce_amd_inj.c +1 -1
@@ -140,7 +140,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);
Signature · 1 line
1.7.2
Borislav Petkov
AppliedQuoted 3 lines · Axel Lin
Otherwise, variable i will be -1 inside the latest iteration of the while loop.
Signed-off-by Axel Lin <[email protected]>
Good catch.
Applied,
thanks.
Signature · 8 lines
Regards/Gruss, Boris. Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632