mailbox: th1520: fix clock imbalance on probe failure
Subsystems (3)
PATCH 1/1 mailbox: th1520: fix clock imbalance on probe failure
The purpose of the devm_add_action_or_reset() helper is to call the action function in case adding an action ever fails so drop the clock disable from the error path to avoid disabling the clocks twice.
--- drivers/mailbox/mailbox-th1520.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mailbox/mailbox-th1520.c +1 -3
@@ -435,10 +435,8 @@ static int th1520_mbox_probe(struct platform_device *pdev) } ret =devm_add_action_or_reset (dev, th1520_disable_clk, priv); -if (ret) { -clk_bulk_disable_unprepare (ARRAY_SIZE (priv->clocks), priv->clocks); +if (ret)return ret; - }/* * The address mappings in the device tree align precisely with those
Signature · 1 line
2.49.1
Quoted 17 lines · Johan Hovold
The purpose of the
devm_add_action_or_reset()helper is to call the action function in case adding an action ever fails so drop the clock disable from the error path to avoid disabling the clocks twice.Fixes 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")Cc Michal Wilczynski <[email protected]>Signed-off-by Johan Hovold <[email protected]>--- drivers/mailbox/mailbox-th1520.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/mailbox/mailbox-th1520.c +0
-0@@ -435,10 +435,8 @@ static int th1520_mbox_probe(struct platform_device *pdev) }
drivers/mailbox/mailbox-th1520.c static int th1520_mbox_probe(struct platform_device *pdev) · line 442
Quoted 10 lines
drivers/mailbox/mailbox-th1520.c +1
-3ret =devm_add_action_or_reset (dev, th1520_disable_clk, priv); -if (ret) { -clk_bulk_disable_unprepare (ARRAY_SIZE (priv->clocks), priv->clocks); +if (ret)return ret; - }/* * The address mappings in the device tree align precisely with those
Hi,
Thanks for your fix. I believe it is correct as devm_add_action_or_reset will call th1520_disable_clk on failure, like you noticed.
Best regards,
Signature · 1 line
Michal Wilczynski <[email protected]>
Quoted 8 lines · Johan Hovold
The purpose of the
devm_add_action_or_reset()helper is to call the action function in case adding an action ever fails so drop the clock disable from the error path to avoid disabling the clocks twice.Fixes 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")Cc Michal Wilczynski <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Can this one be picked up for 6.19?
Johan
Quoted 30 lines · Johan Hovold
The purpose of the
devm_add_action_or_reset()helper is to call the action function in case adding an action ever fails so drop the clock disable from the error path to avoid disabling the clocks twice.Fixes 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")Cc Michal Wilczynski <[email protected]>Signed-off-by Johan Hovold <[email protected]>--- drivers/mailbox/mailbox-th1520.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/mailbox/mailbox-th1520.c +1
-3@@ -435,10 +435,8 @@ static int th1520_mbox_probe(struct platform_device *pdev) } ret =devm_add_action_or_reset (dev, th1520_disable_clk, priv); -if (ret) { -clk_bulk_disable_unprepare (ARRAY_SIZE (priv->clocks), priv->clocks); +if (ret)return ret; - }/* * The address mappings in the device tree align precisely with those Signature · 1 line
2.49.1
Jassi - are you able to take this through your mailbox tree?
Thanks,
Drew
Quoted 11 lines · Johan Hovold
Quoted 8 lines · Johan Hovold
The purpose of the
devm_add_action_or_reset()helper is to call the action function in case adding an action ever fails so drop the clock disable from the error path to avoid disabling the clocks twice.Fixes 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")Cc Michal Wilczynski <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Can this one be picked up for 6.19?
It's been another month so sending another reminder. Can this one be picked up for 6.19?
Johan
Drew Fustini
maintainerQuoted 11 lines · Johan Hovold
Quoted 10 lines · Johan Hovold
Quoted 8 lines · Johan Hovold
The purpose of the
devm_add_action_or_reset()helper is to call the action function in case adding an action ever fails so drop the clock disable from the error path to avoid disabling the clocks twice.Fixes 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")Cc Michal Wilczynski <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Quoted 6 lines
Quoted 1 line
Can this one be picked up for 6.19?
It's been another month so sending another reminder. Can this one be picked up for 6.19?
Johan
It looks like this is now in the 6.18-rc7 PR from Jassi :)
https://lore.kernel.org/all/CABb+yY2GeWHWeASzemit8XvgvHg=Cse+46CqF3KJfsBXNPEBAw@mail.gmail.com/
-Drew
Quoted 12 lines · Drew Fustini
Quoted 11 lines · Johan Hovold
Quoted 10 lines · Johan Hovold
Quoted 8 lines · Johan Hovold
The purpose of the
devm_add_action_or_reset()helper is to call the action function in case adding an action ever fails so drop the clock disable from the error path to avoid disabling the clocks twice.Fixes 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")Cc Michal Wilczynski <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Can this one be picked up for 6.19?
It's been another month so sending another reminder. Can this one be picked up for 6.19?
It looks like this is now in the 6.18-rc7 PR from Jassi :)
https://lore.kernel.org/all/CABb+yY2GeWHWeASzemit8XvgvHg=Cse+46CqF3KJfsBXNPEBAw@mail.gmail.com/
Yes, indeed, it made it into 6.18. Thanks!
Johan