mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] i2c/buses/scx200_acb: handle PCI errors
@ 2006-10-10 13:22 Jeff Garzik
  2006-10-11  5:41 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2006-10-10 13:22 UTC (permalink / raw)
  To: wingel, khali, Andrew Morton, LKML



Signed-off-by: Jeff Garzik <jeff@garzik.org>

---

 drivers/i2c/busses/scx200_acb.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 32aab0d..714bae7 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -494,11 +494,12 @@ static __init int scx200_create_pci(cons
 	iface->pdev = pdev;
 	iface->bar = bar;
 
-	pci_enable_device_bars(iface->pdev, 1 << iface->bar);
+	rc = pci_enable_device_bars(iface->pdev, 1 << iface->bar);
+	if (rc)
+		goto errout_free;
 
 	rc = pci_request_region(iface->pdev, iface->bar, iface->adapter.name);
-
-	if (rc != 0) {
+	if (rc) {
 		printk(KERN_ERR NAME ": can't allocate PCI BAR %d\n",
 				iface->bar);
 		goto errout_free;

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

* Re: [PATCH] i2c/buses/scx200_acb: handle PCI errors
  2006-10-10 13:22 [PATCH] i2c/buses/scx200_acb: handle PCI errors Jeff Garzik
@ 2006-10-11  5:41 ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2006-10-11  5:41 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: wingel, Andrew Morton, LKML

Hi Jeff,

>  drivers/i2c/busses/scx200_acb.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
> index 32aab0d..714bae7 100644
> --- a/drivers/i2c/busses/scx200_acb.c
> +++ b/drivers/i2c/busses/scx200_acb.c
> @@ -494,11 +494,12 @@ static __init int scx200_create_pci(cons
>  	iface->pdev = pdev;
>  	iface->bar = bar;
>  
> -	pci_enable_device_bars(iface->pdev, 1 << iface->bar);
> +	rc = pci_enable_device_bars(iface->pdev, 1 << iface->bar);
> +	if (rc)
> +		goto errout_free;
>  
>  	rc = pci_request_region(iface->pdev, iface->bar, iface->adapter.name);
> -
> -	if (rc != 0) {
> +	if (rc) {
>  		printk(KERN_ERR NAME ": can't allocate PCI BAR %d\n",
>  				iface->bar);
>  		goto errout_free;

Looks good, applied, thanks.

-- 
Jean Delvare

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

end of thread, other threads:[~2006-10-11  5:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-10 13:22 [PATCH] i2c/buses/scx200_acb: handle PCI errors Jeff Garzik
2006-10-11  5:41 ` Jean Delvare

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

all inboxes | Powered by JetHome®