Skip to content

Commit e3cee98

Browse files
jhovoldJassi Brar
authored andcommitted
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. Fixes: 5d4d263 ("mailbox: Introduce support for T-head TH1520 Mailbox driver") Cc: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
1 parent ff0e4d4 commit e3cee98

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/mailbox/mailbox-th1520.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,8 @@ static int th1520_mbox_probe(struct platform_device *pdev)
435435
}
436436

437437
ret = devm_add_action_or_reset(dev, th1520_disable_clk, priv);
438-
if (ret) {
439-
clk_bulk_disable_unprepare(ARRAY_SIZE(priv->clocks), priv->clocks);
438+
if (ret)
440439
return ret;
441-
}
442440

443441
/*
444442
* The address mappings in the device tree align precisely with those

0 commit comments

Comments
 (0)