mei: vsc: Unset the event callback on remove and probe errors
Make mei_vsc_remove() properly unset the callback to avoid a dead callback
sticking around after probe errors or unbinding of the platform driver.
Fixes: 386a766c41 ("mei: Add MEI hardware support for IVSC device")
Signed-off-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250623085052.12347-8-hansg@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
18f14b2e7f
commit
6175c69740
@@ -380,6 +380,8 @@ err_stop:
|
||||
err_cancel:
|
||||
mei_cancel_work(mei_dev);
|
||||
|
||||
vsc_tp_register_event_cb(tp, NULL, NULL);
|
||||
|
||||
mei_disable_interrupts(mei_dev);
|
||||
|
||||
return ret;
|
||||
@@ -388,11 +390,14 @@ err_cancel:
|
||||
static void mei_vsc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct mei_device *mei_dev = platform_get_drvdata(pdev);
|
||||
struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev);
|
||||
|
||||
pm_runtime_disable(mei_dev->dev);
|
||||
|
||||
mei_stop(mei_dev);
|
||||
|
||||
vsc_tp_register_event_cb(hw->tp, NULL, NULL);
|
||||
|
||||
mei_disable_interrupts(mei_dev);
|
||||
|
||||
mei_deregister(mei_dev);
|
||||
|
||||
Reference in New Issue
Block a user