Commit d29f072f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: fix oops in keyspan and whiteheat devices when plugged in.

Thanks to Pat Mochel for finding out where the error was for this bug.
parent 15c1de8a
...@@ -871,7 +871,8 @@ static void destroy_serial (struct kobject *kobj) ...@@ -871,7 +871,8 @@ static void destroy_serial (struct kobject *kobj)
/* the ports are cleaned up and released in port_release() */ /* the ports are cleaned up and released in port_release() */
for (i = 0; i < serial->num_ports; ++i) 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 /* 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 * not get cleaned up in port_release() as it was never registered with
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment