public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [IPMI] Fix return codes in failure case.
@ 2006-10-18  4:28 Dave Jones
  2006-10-18 15:08 ` Corey Minyard
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2006-10-18  4:28 UTC (permalink / raw)
  To: Linux Kernel; +Cc: minyard

These returns should be negative, like the others in this function.

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 24825bd..e5cfb1f 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1789,7 +1789,7 @@ static int __devinit ipmi_pci_probe(stru
 
 	info = kzalloc(sizeof(*info), GFP_KERNEL);
 	if (!info)
-		return ENOMEM;
+		return -ENOMEM;
 
 	info->addr_source = "PCI";
 
@@ -1810,7 +1810,7 @@ static int __devinit ipmi_pci_probe(stru
 		kfree(info);
 		printk(KERN_INFO "ipmi_si: %s: Unknown IPMI type: %d\n",
 		       pci_name(pdev), class_type);
-		return ENOMEM;
+		return -ENOMEM;
 	}
 
 	rv = pci_enable_device(pdev);

-- 
http://www.codemonkey.org.uk

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

* Re: [IPMI] Fix return codes in failure case.
  2006-10-18  4:28 [IPMI] Fix return codes in failure case Dave Jones
@ 2006-10-18 15:08 ` Corey Minyard
  0 siblings, 0 replies; 2+ messages in thread
From: Corey Minyard @ 2006-10-18 15:08 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel

Thanks, looks good.

-Corey

Dave Jones wrote:
> These returns should be negative, like the others in this function.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
>
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 24825bd..e5cfb1f 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -1789,7 +1789,7 @@ static int __devinit ipmi_pci_probe(stru
>  
>  	info = kzalloc(sizeof(*info), GFP_KERNEL);
>  	if (!info)
> -		return ENOMEM;
> +		return -ENOMEM;
>  
>  	info->addr_source = "PCI";
>  
> @@ -1810,7 +1810,7 @@ static int __devinit ipmi_pci_probe(stru
>  		kfree(info);
>  		printk(KERN_INFO "ipmi_si: %s: Unknown IPMI type: %d\n",
>  		       pci_name(pdev), class_type);
> -		return ENOMEM;
> +		return -ENOMEM;
>  	}
>  
>  	rv = pci_enable_device(pdev);
>
>   


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

end of thread, other threads:[~2006-10-18 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18  4:28 [IPMI] Fix return codes in failure case Dave Jones
2006-10-18 15:08 ` Corey Minyard

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