From: Andrew Morton <akpm@osdl.org>
To: Jiri Kosina <jikos@jikos.cz>
Cc: Stephen Hemminger <shemminger@osdl.org>,
mlindner@syskonnect.de, rroesler@syskonnect.de,
Jeff Garzik <jeff@garzik.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] sk98lin: handle pci_enable_device() return value in skge_resume() properly
Date: Thu, 12 Oct 2006 17:50:13 -0700 [thread overview]
Message-ID: <20061012175013.87564a57.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610130052440.29022@twin.jikos.cz>
On Fri, 13 Oct 2006 00:57:18 +0200 (CEST)
Jiri Kosina <jikos@jikos.cz> wrote:
> @@ -5070,7 +5070,13 @@ static int skge_resume(struct pci_dev *p
>
> pci_set_power_state(pdev, PCI_D0);
> pci_restore_state(pdev);
> - pci_enable_device(pdev);
> + ret = pci_enable_device(pdev);
> + if (ret) {
> + printk(KERN_ERR "sk98lin: Cannot enable PCI device %s during resume\n",
> + dev->name);
> + unregister_netdev(dev);
This looks rather wrong - skge_exit() will run unregister_netdev() again.
Look a few lines down, to where this function already handles request_irq()
failure, reuse that code path. Hopefully it has been tested..
(Once we have an easy-to-use fault-injection framework we'll be able to
test all these things more easily)
(But it's possible to test them already, with a bit of ad-hoc testing code)
next prev parent reply other threads:[~2006-10-13 0:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 22:17 [PATCH] sk98lin: handle pci_enable_device() return value in skge_resume() properly Jiri Kosina
2006-10-12 22:25 ` Stephen Hemminger
2006-10-12 22:38 ` Jiri Kosina
2006-10-12 22:47 ` Stephen Hemminger
2006-10-12 22:57 ` Jiri Kosina
2006-10-13 0:50 ` Andrew Morton [this message]
2006-10-13 1:12 ` Jiri Kosina
2007-02-23 23:17 ` [PATCH] sk98lin: handle pci_enable_device() return value in skge_resume() Dmitriy Monakhov
2007-02-24 11:41 ` Dmitriy Monakhov
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=20061012175013.87564a57.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jeff@garzik.org \
--cc=jikos@jikos.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mlindner@syskonnect.de \
--cc=netdev@vger.kernel.org \
--cc=rroesler@syskonnect.de \
--cc=shemminger@osdl.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;
as well as URLs for NNTP newsgroup(s).