platform/chrome: cros_ec: fix error handling in cros_ec_register()
Fix cros_ec_register() to unregister platform devices if blocking_notifier_chain_register() fails. Also use the single exit path to handle the platform device unregistration. Fixes: 42cd0ab4 ("platform/chrome: cros_ec: Query EC protocol version if EC transitions between RO/RW") Reviewed-by: NPrashant Malani <pmalani@chromium.org> Signed-off-by: NTzung-Bi Shih <tzungbi@kernel.org>
Showing
想要评论请 注册 或 登录