mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] EDAC, MCE: Fix edac_init_mce_inject error handling
@ 2010-11-19  3:05 Axel Lin
  2010-11-19  5:09 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2010-11-19  3:05 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: linux-kernel

Otherwise, variable i will be -1 inside the latest iteration of the while loop.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/edac/mce_amd_inj.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c
index 6db494f..733a7e7 100644
--- a/drivers/edac/mce_amd_inj.c
+++ b/drivers/edac/mce_amd_inj.c
@@ -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);
-- 
1.7.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] EDAC, MCE: Fix edac_init_mce_inject error handling
  2010-11-19  3:05 [PATCH] EDAC, MCE: Fix edac_init_mce_inject error handling Axel Lin
@ 2010-11-19  5:09 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2010-11-19  5:09 UTC (permalink / raw)
  To: Axel Lin; +Cc: Petkov, Borislav, linux-kernel

On Thu, Nov 18, 2010 at 10:05:43PM -0500, Axel Lin wrote:
> Otherwise, variable i will be -1 inside the latest iteration of the while loop.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Good catch.

Applied,
thanks.

-- 
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-19  5:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19  3:05 [PATCH] EDAC, MCE: Fix edac_init_mce_inject error handling Axel Lin
2010-11-19  5:09 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome