kernel/drivers/platform/chrome/cros_usbpd_notify.c
.. .. @@ -284,7 +284,11 @@ 284 284 return ret; 285 285 286 286 #ifdef CONFIG_ACPI 287 - platform_driver_register(&cros_usbpd_notify_acpi_driver);287 + ret = platform_driver_register(&cros_usbpd_notify_acpi_driver);288 + if (ret) {289 + platform_driver_unregister(&cros_usbpd_notify_plat_driver);290 + return ret;291 + }288 292 #endif 289 293 return 0; 290 294 }