public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c
@ 2009-10-19  8:33 Li Hong
  2009-10-19 12:52 ` Borislav Petkov
  2009-10-19 14:58 ` Doug Thompson
  0 siblings, 2 replies; 4+ messages in thread
From: Li Hong @ 2009-10-19  8:33 UTC (permalink / raw)
  To: Borislav Petkov, Doug Thompson, linux-kernel

In amd64_edac_init(void) in amd64_edac.c, cache_k8_northbridges() is called
before pci_register_driver. If it fails, should exit with err directly.

Signed-off-by: Li Hong <lihong.hi@gmail.com>
---
 drivers/edac/amd64_edac.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index d4560d9..3ee539a 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3163,7 +3163,7 @@ static int __init amd64_edac_init(void)
 	opstate_init();
 
 	if (cache_k8_northbridges() < 0)
-		goto err_exit;
+		return err;
 
 	err = pci_register_driver(&amd64_pci_driver);
 	if (err)
@@ -3189,8 +3189,6 @@ static int __init amd64_edac_init(void)
 
 err_2nd_stage:
 	debugf0("2nd stage failed\n");
-
-err_exit:
 	pci_unregister_driver(&amd64_pci_driver);
 
 	return err;
-- 
1.6.0.4


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

* Re: [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c
  2009-10-19  8:33 [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c Li Hong
@ 2009-10-19 12:52 ` Borislav Petkov
  2009-10-20  1:39   ` Li Hong
  2009-10-19 14:58 ` Doug Thompson
  1 sibling, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2009-10-19 12:52 UTC (permalink / raw)
  To: Li Hong; +Cc: Doug Thompson, LKML

On Mon, Oct 19, 2009 at 04:33:29PM +0800, Li Hong wrote:
> In amd64_edac_init(void) in amd64_edac.c, cache_k8_northbridges() is called
> before pci_register_driver. If it fails, should exit with err directly.
> 
> Signed-off-by: Li Hong <lihong.hi@gmail.com>

Thanks, queued for the next .32 update.

By the way, is this something you've caught by looking at the code
or is it a condition you're hitting on a real system with a specific
workload? If it is the second, I'd like to know more wrt to why
cache_k8_northbridges() is failing in your particular case.

Thanks.

-- 
Regards/Gruss,
Boris.

Operating | Advanced Micro Devices GmbH
  System  | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
 Research | Geschäftsführer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
  (OSRC)  | Registergericht München, HRB Nr. 43632


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

* Re: [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c
  2009-10-19  8:33 [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c Li Hong
  2009-10-19 12:52 ` Borislav Petkov
@ 2009-10-19 14:58 ` Doug Thompson
  1 sibling, 0 replies; 4+ messages in thread
From: Doug Thompson @ 2009-10-19 14:58 UTC (permalink / raw)
  To: Borislav Petkov, Doug Thompson, linux-kernel, Li Hong



--- On Mon, 10/19/09, Li Hong <lihong.hi@gmail.com> wrote:

> From: Li Hong <lihong.hi@gmail.com>
> Subject: [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c
> To: "Borislav Petkov" <borislav.petkov@amd.com>, "Doug Thompson" <dougthompson@xmission.com>, linux-kernel@vger.kernel.org
> Date: Monday, October 19, 2009, 2:33 AM
> In amd64_edac_init(void) in
> amd64_edac.c, cache_k8_northbridges() is called
> before pci_register_driver. If it fails, should exit with
> err directly.
> 
> Signed-off-by: Li Hong <lihong.hi@gmail.com>

Acked-by: Doug Thompson <dougthompson@xmission.com>


> ---
>  drivers/edac/amd64_edac.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/edac/amd64_edac.c
> b/drivers/edac/amd64_edac.c
> index d4560d9..3ee539a 100644
> --- a/drivers/edac/amd64_edac.c
> +++ b/drivers/edac/amd64_edac.c
> @@ -3163,7 +3163,7 @@ static int __init
> amd64_edac_init(void)
>      opstate_init();
>  
>      if (cache_k8_northbridges() < 0)
> -        goto err_exit;
> +        return err;
>  
>      err =
> pci_register_driver(&amd64_pci_driver);
>      if (err)
> @@ -3189,8 +3189,6 @@ static int __init
> amd64_edac_init(void)
>  
>  err_2nd_stage:
>      debugf0("2nd stage failed\n");
> -
> -err_exit:
>     
> pci_unregister_driver(&amd64_pci_driver);
>  
>      return err;
> -- 
> 1.6.0.4
> 
> 

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

* Re: [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c
  2009-10-19 12:52 ` Borislav Petkov
@ 2009-10-20  1:39   ` Li Hong
  0 siblings, 0 replies; 4+ messages in thread
From: Li Hong @ 2009-10-20  1:39 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Doug Thompson, LKML

Just caught by looking at the code. Thanks.

2009/10/19 Borislav Petkov <borislav.petkov@amd.com>:
> On Mon, Oct 19, 2009 at 04:33:29PM +0800, Li Hong wrote:
>> In amd64_edac_init(void) in amd64_edac.c, cache_k8_northbridges() is called
>> before pci_register_driver. If it fails, should exit with err directly.
>>
>> Signed-off-by: Li Hong <lihong.hi@gmail.com>
>
> Thanks, queued for the next .32 update.
>
> By the way, is this something you've caught by looking at the code
> or is it a condition you're hitting on a real system with a specific
> workload? If it is the second, I'd like to know more wrt to why
> cache_k8_northbridges() is failing in your particular case.
>
> Thanks.
>
> --
> Regards/Gruss,
> Boris.
>
> Operating | Advanced Micro Devices GmbH
>  System  | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
>  Research | Geschäftsführer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
>  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
>  (OSRC)  | Registergericht München, HRB Nr. 43632
>
>

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

end of thread, other threads:[~2009-10-20  1:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19  8:33 [PATCH] amd64_edac: fix a wrong goto clause in amd64_edac.c Li Hong
2009-10-19 12:52 ` Borislav Petkov
2009-10-20  1:39   ` Li Hong
2009-10-19 14:58 ` Doug Thompson

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