mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
mailbox: arm_mhu_db: Remove redundant mbox_controller_unregister() on probe failure
mhu_db_probe() registers the mailbox controller via
devm_mbox_controller_register(), which automatically calls
mbox_controller_unregister() through devres when the device is removed
or probe fails. If devm_request_threaded_irq() subsequently fails in
the channel setup loop, the error path also manually calls
mbox_controller_unregister(), resulting in a double call that corrupts
the global mailbox controller list and causes a kernel panic.
Remove the redundant manual call and rely on devres for cleanup.
Fixes: 7002ca237b ("mailbox: arm_mhu: Add ARM MHU doorbell driver")
Signed-off-by: Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
Reviewed-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
This commit is contained in:
parent
da988ac6af
commit
8228ed61b6
|
|
@ -317,10 +317,8 @@ static int mhu_db_probe(struct amba_device *adev, const struct amba_id *id)
|
|||
err = devm_request_threaded_irq(dev, irq, NULL,
|
||||
mhu_db_mbox_rx_handler,
|
||||
IRQF_ONESHOT, "mhu_db_link", mhu);
|
||||
if (err) {
|
||||
mbox_controller_unregister(&mhu->mbox);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
dev_info(dev, "ARM MHU Doorbell mailbox registered\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user