From: Greg KH <greg@kroah.com>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.9-rc3-mm1, bk-pci patch, USB hubs
Date: Mon, 4 Oct 2004 15:11:08 -0700 [thread overview]
Message-ID: <20041004221107.GC11110@kroah.com> (raw)
In-Reply-To: <9e473391041003113351c6e237@mail.gmail.com>
On Sun, Oct 03, 2004 at 02:33:48PM -0400, Jon Smirl wrote:
> These changes make the USB hub module fail to load. I get a trap in
> kmem_cache_alloc called from uhci_alloc_urb_private. Reverting them
> fixes it.
Thanks, but I've fixed up pci_register_driver() to not return a fake
"1", which was undocumented, and not a nice thing to do.
That patch is below, and is in my trees, which will cause it to show up
in the next -mm release.
thanks,
greg k-h
===== pci-driver.c 1.46 vs edited =====
--- 1.46/drivers/pci/pci-driver.c 2004-09-29 23:09:23 -07:00
+++ edited/pci-driver.c 2004-10-04 11:11:20 -07:00
@@ -396,13 +396,13 @@
* @drv: the driver structure to register
*
* Adds the driver structure to the list of registered drivers.
- * Returns a negative value on error. The driver remains registered
- * even if no device was claimed during registration.
+ * Returns a negative value on error, otherwise 0.
+ * If no error occured, the driver remains registered even if
+ * no device was claimed during registration.
*/
-int
-pci_register_driver(struct pci_driver *drv)
+int pci_register_driver(struct pci_driver *drv)
{
- int count = 0;
+ int error;
/* initialize common driver fields */
drv->driver.name = drv->name;
@@ -414,13 +414,12 @@
pci_init_dynids(&drv->dynids);
/* register with core */
- count = driver_register(&drv->driver);
+ error = driver_register(&drv->driver);
- if (count >= 0) {
+ if (!error)
pci_populate_driver_dir(drv);
- }
- return count ? count : 1;
+ return error;
}
/**
next prev parent reply other threads:[~2004-10-04 22:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-03 18:33 2.6.9-rc3-mm1, bk-pci patch, USB hubs Jon Smirl
2004-10-04 22:11 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-10-03 19:02 Hanno Meyer-Thurow
2004-10-03 19:07 ` Jon Smirl
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=20041004221107.GC11110@kroah.com \
--to=greg@kroah.com \
--cc=jonsmirl@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.