public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Broadcom 4400 resume small fix
@ 2007-01-08 16:26 Dmitriy Monakhov
  2007-01-08 21:01 ` Francois Romieu
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitriy Monakhov @ 2007-01-08 16:26 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

Return value  of 'pci_enable_device' was ignored in b44_resume().
We can't ingore it because it can fail.

Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
-------

[-- Attachment #2: diff-ms-net-b44 --]
[-- Type: text/plain, Size: 546 bytes --]

diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 5eb2ec6..63de31b 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2315,9 +2315,15 @@ static int b44_resume(struct pci_dev *pd
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct b44 *bp = netdev_priv(dev);
+	int err;
 
 	pci_restore_state(pdev);
-	pci_enable_device(pdev);
+	err = pci_enable_device(pdev);
+	if (err) {
+		dev_err(&pdev->dev, "Cannot enable PCI device, "
+		       "aborting.\n");
+		return err;
+	}
 	pci_set_master(pdev);
 
 	if (!netif_running(dev))

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

* Re: [PATCH] Broadcom 4400 resume small fix
  2007-01-08 16:26 [PATCH] Broadcom 4400 resume small fix Dmitriy Monakhov
@ 2007-01-08 21:01 ` Francois Romieu
  0 siblings, 0 replies; 2+ messages in thread
From: Francois Romieu @ 2007-01-08 21:01 UTC (permalink / raw)
  To: Dmitriy Monakhov; +Cc: linux-kernel, zambrano

Dmitriy Monakhov <dmonakhov@sw.ru> :
> Return value  of 'pci_enable_device' was ignored in b44_resume().
> We can't ingore it because it can fail.

- Please Cc: netdev@vger.kernel.org, jeff@garzik.org and the maintainer
  of the driver (Gary Zambrano <zambrano@broadcom.com> as per MAINTAINERS
  file and the log of the driveri).
- the dev_err() message fits completely on a 80 columns line.
- request-irq is not checked a few lines below either.

It would be nice to avoid the free_irq/pci_disable_device dance altogether.

-- 
Ueimor

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

end of thread, other threads:[~2007-01-08 21:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-08 16:26 [PATCH] Broadcom 4400 resume small fix Dmitriy Monakhov
2007-01-08 21:01 ` Francois Romieu

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