mirror of https://github.com/torvalds/linux.git
platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
The blocking notifier is registered in cros_ec_register(); however, it
isn't unregistered in cros_ec_unregister().
Fix it.
Fixes: 42cd0ab476 ("platform/chrome: cros_ec: Query EC protocol version if EC transitions between RO/RW")
Cc: stable@vger.kernel.org
Reviewed-by: Benson Leung <bleung@chromium.org>
Link: https://lore.kernel.org/r/20250722120513.234031-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
This commit is contained in:
parent
ab229c2b72
commit
e237495346
|
|
@ -318,6 +318,9 @@ EXPORT_SYMBOL(cros_ec_register);
|
|||
*/
|
||||
void cros_ec_unregister(struct cros_ec_device *ec_dev)
|
||||
{
|
||||
if (ec_dev->mkbp_event_supported)
|
||||
blocking_notifier_chain_unregister(&ec_dev->event_notifier,
|
||||
&ec_dev->notifier_ready);
|
||||
platform_device_unregister(ec_dev->pd);
|
||||
platform_device_unregister(ec_dev->ec);
|
||||
mutex_destroy(&ec_dev->lock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue