Skip to content

Commit 933e51f

Browse files
committed
mei: vsc: Unset the event callback on remove and probe errors
JIRA: https://issues.redhat.com/browse/RHEL-113185 commit 6175c69 Author: Hans de Goede <hansg@kernel.org> Date: Mon Jun 23 10:50:49 2025 +0200 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: 386a766 ("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> Signed-off-by: Steve Best <sbest@redhat.com>
1 parent ee0316b commit 933e51f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/misc/mei/platform-vsc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ static int mei_vsc_probe(struct platform_device *pdev)
380380
err_cancel:
381381
mei_cancel_work(mei_dev);
382382

383+
vsc_tp_register_event_cb(tp, NULL, NULL);
384+
383385
mei_disable_interrupts(mei_dev);
384386

385387
return ret;
@@ -388,11 +390,14 @@ static int mei_vsc_probe(struct platform_device *pdev)
388390
static void mei_vsc_remove(struct platform_device *pdev)
389391
{
390392
struct mei_device *mei_dev = platform_get_drvdata(pdev);
393+
struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev);
391394

392395
pm_runtime_disable(mei_dev->dev);
393396

394397
mei_stop(mei_dev);
395398

399+
vsc_tp_register_event_cb(hw->tp, NULL, NULL);
400+
396401
mei_disable_interrupts(mei_dev);
397402

398403
mei_deregister(mei_dev);

0 commit comments

Comments
 (0)