Commit 3eb4b388 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: serial core fix to solve ordering issues when destroying our objects.

parent 58801a2a
...@@ -829,8 +829,6 @@ static void destroy_serial (struct kobject *kobj) ...@@ -829,8 +829,6 @@ static void destroy_serial (struct kobject *kobj)
} }
} }
usb_put_dev(serial->dev);
serial->dev = NULL;
serial_shutdown (serial); serial_shutdown (serial);
for (i = 0; i < serial->num_ports; ++i) for (i = 0; i < serial->num_ports; ++i)
...@@ -869,6 +867,8 @@ static void destroy_serial (struct kobject *kobj) ...@@ -869,6 +867,8 @@ static void destroy_serial (struct kobject *kobj)
/* return the minor range that this device had */ /* return the minor range that this device had */
return_serial (serial); return_serial (serial);
usb_put_dev(serial->dev);
/* free up any memory that we allocated */ /* free up any memory that we allocated */
kfree (serial); kfree (serial);
} }
......
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