Make sure the android0 device is removed before we can destroy
the class.
Change-Id: Id584888c407beb80a1df4990f73fe31ccb9d4767
Signed-off-by: Benoit Goby <benoit@android.com>
err = usb_composite_probe(&android_usb_driver);
if (err) {
pr_err("%s: failed to probe driver %d", __func__, err);
- goto err_create;
+ goto err_probe;
}
/* HACK: exchange composite's setup with ours */
return 0;
+err_probe:
+ device_destroy(android_class, dev->dev->devt);
err_create:
kfree(dev);
err_dev: