Fix resources (accessible through sysfs) being released before interface
is deregistered.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
{
struct gb_interface *intf = to_gb_interface(dev);
+ kfree(intf->product_string);
+ kfree(intf->vendor_string);
+
kfree(intf);
}
list_for_each_entry_safe(bundle, next, &intf->bundles, links)
gb_bundle_destroy(bundle);
- kfree(intf->product_string);
- kfree(intf->vendor_string);
-
module = intf->module;
device_unregister(&intf->dev);
put_device(&module->dev);