From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI fixes for 2.6.10-rc1
Date: Fri, 12 Nov 2004 15:21:55 -0800 [thread overview]
Message-ID: <11003017153578@kroah.com> (raw)
In-Reply-To: <11003017151066@kroah.com>
ChangeSet 1.2026.35.3, 2004/10/28 15:15:12-05:00, akpm@osdl.org
[PATCH] PCI: propagate pci_enable_device() errors
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
Jeff Garzik pointed out that I should have propagated the error returned
from pci_enable_device() rather than making up -ENODEV.
Propagate pci_enable_device() error returns rather than using -ENODEV.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/atm/idt77252.c | 4 ++--
drivers/isdn/tpam/tpam_main.c | 4 ++--
drivers/misc/ibmasm/module.c | 6 +++---
drivers/net/tulip/de4x5.c | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
--- a/drivers/atm/idt77252.c 2004-11-12 15:14:36 -08:00
+++ b/drivers/atm/idt77252.c 2004-11-12 15:14:36 -08:00
@@ -3685,9 +3685,9 @@
int i, err;
- if (pci_enable_device(pcidev)) {
+ if ((err = pci_enable_device(pcidev))) {
printk("idt77252: can't enable PCI device at %s\n", pci_name(pcidev));
- return -ENODEV;
+ return err;
}
if (pci_read_config_word(pcidev, PCI_REVISION_ID, &revision)) {
diff -Nru a/drivers/isdn/tpam/tpam_main.c b/drivers/isdn/tpam/tpam_main.c
--- a/drivers/isdn/tpam/tpam_main.c 2004-11-12 15:14:36 -08:00
+++ b/drivers/isdn/tpam/tpam_main.c 2004-11-12 15:14:36 -08:00
@@ -88,10 +88,10 @@
tpam_card *card, *c;
int i, err;
- if (pci_enable_device(dev)) {
+ if ((err = pci_enable_device(dev))) {
printk(KERN_ERR "TurboPAM: can't enable PCI device at %s\n",
pci_name(dev));
- return -ENODEV;
+ return err;
}
/* allocate memory for the board structure */
diff -Nru a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
--- a/drivers/misc/ibmasm/module.c 2004-11-12 15:14:36 -08:00
+++ b/drivers/misc/ibmasm/module.c 2004-11-12 15:14:36 -08:00
@@ -59,13 +59,13 @@
static int __init ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
- int result = -ENOMEM;
+ int err, result = -ENOMEM;
struct service_processor *sp;
- if (pci_enable_device(pdev)) {
+ if ((err = pci_enable_device(pdev))) {
printk(KERN_ERR "%s: can't enable PCI device at %s\n",
DRIVER_NAME, pci_name(pdev));
- return -ENODEV;
+ return err;
}
sp = kmalloc(sizeof(struct service_processor), GFP_KERNEL);
diff -Nru a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
--- a/drivers/net/tulip/de4x5.c 2004-11-12 15:14:36 -08:00
+++ b/drivers/net/tulip/de4x5.c 2004-11-12 15:14:36 -08:00
@@ -2242,8 +2242,8 @@
return -ENODEV;
/* Ok, the device seems to be for us. */
- if (pci_enable_device (pdev))
- return -ENODEV;
+ if ((error = pci_enable_device (pdev)))
+ return error;
if (!(dev = alloc_etherdev (sizeof (struct de4x5_private)))) {
error = -ENOMEM;
next prev parent reply other threads:[~2004-11-13 1:25 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-12 23:20 [BK PATCH] PCI fixes for 2.6.10-rc1 Greg KH
2004-11-12 23:21 ` [PATCH] " Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH [this message]
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:21 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-12 23:22 ` Greg KH
2004-11-13 9:12 ` Russell King
2004-11-13 10:03 ` Jan Dittmer
2004-11-13 10:22 ` Russell King
2004-11-13 10:45 ` Jan Dittmer
2004-11-13 10:48 ` Russell King
2004-11-13 10:58 ` Jan Dittmer
-- strict thread matches above, loose matches on Subject: below --
2004-11-13 7:33 James Tabor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11003017153578@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox