diff options
| author | Chaithanya Lagisetty <nagachaithanya9911@gmail.com> | 2026-08-19 05:35:18 +0000 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-09-10 18:21:15 +0530 |
| commit | d09cd5e8bbc98969b5333015b45c525078ac0f6f (patch) | |
| tree | 7b252f14895b0a92a5e606de32e0d8296550c36e /tools/perf/scripts/python | |
| parent | bf27ec04a888d4f1301a8da040719f2c332da681 (diff) | |
| download | linux-next-d09cd5e8bbc98969b5333015b45c525078ac0f6f.tar.gz linux-next-d09cd5e8bbc98969b5333015b45c525078ac0f6f.zip | |
dmaengine: sprd: use clk_bulk API to fix clock imbalance
sprd_dma_enable() enabled sdev->clk and then the optional ashb_clk. If
enabling ashb_clk failed, sdev->clk was left enabled: both callers
(probe and resume) treat a non-zero return as "nothing was enabled" and
bail out, leaking sdev->clk.
Convert the driver to the clk_bulk API. clk_bulk_prepare_enable()
enables all clocks and unwinds them on failure, and
clk_bulk_disable_unprepare() disables them, which fixes the imbalance
and simplifies the enable/disable paths. Both clocks are fetched with
devm_clk_bulk_get_optional(); the optional ashb_eb clock simply becomes
a NULL entry that the bulk helpers treat as a no-op, while the mandatory
enable clock is still checked explicitly.
Fixes: 9b3b8171f7f4 ("dmaengine: sprd: Add Spreadtrum DMA driver")
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260819053518.2825514-1-nagachaithanya9911@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
