All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix oopses with usb-serial devices (2.6.0-test4)
@ 2003-08-29 20:43 Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2003-08-29 20:43 UTC (permalink / raw)
  To: linux-usb-devel, linux-kernel; +Cc: benh, Patrick Mochel

Hi,

Below is a small patch that fixes the oops that happens in the latest
2.6 kernels when you plug in a keyspan or whiteheat usb to serial
device.  Thanks to Ben for pointing out that there is a problem, and to
Pat for finding where the problem was (in my code, not his :)

I'll be sending it on to Linus next week, but here is is for those
people who want to use their devices again.

thanks,

greg k-h


# USB: fix oops in keyspan and whiteheat devices when plugged in.

diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c	Fri Aug 29 13:39:11 2003
+++ b/drivers/usb/serial/usb-serial.c	Fri Aug 29 13:39:11 2003
@@ -871,7 +871,8 @@
 
 	/* the ports are cleaned up and released in port_release() */
 	for (i = 0; i < serial->num_ports; ++i)
-		device_unregister(&serial->port[i]->dev);
+		if (serial->port[i]->dev.parent != NULL)
+			device_unregister(&serial->port[i]->dev);
 
 	/* If this is a "fake" port, we have to clean it up here, as it will
 	 * not get cleaned up in port_release() as it was never registered with

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-29 20:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-29 20:43 [PATCH] Fix oopses with usb-serial devices (2.6.0-test4) Greg KH

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.