diff options
| author | Biju Das <[email protected]> | 2023-08-16 13:55:49 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-08-16 14:02:41 +0000 |
| commit | e21ac64e669e960688e79bf5babeed63132dac8a (patch) | |
| tree | bc87e6370785dc47ab939ad63c5b59d51f1f13c7 /tools/perf/scripts/python/arm-cs-trace-disasm.py | |
| parent | regulator: Get Synquacer testing working (diff) | |
| download | kernel-e21ac64e669e960688e79bf5babeed63132dac8a.tar.gz kernel-e21ac64e669e960688e79bf5babeed63132dac8a.zip | |
regulator: raa215300: Fix resource leak in case of error
The clk_register_clkdev() allocates memory by calling vclkdev_alloc() and
this memory is not freed in the error path. Similarly, resources allocated
by clk_register_fixed_rate() are not freed in the error path.
Fix these issues by using devm_clk_hw_register_fixed_rate() and
devm_clk_hw_register_clkdev().
After this, the static variable clk is not needed. Replace it withÂ
local variable hw in probe() and drop calling clk_unregister_fixed_rate()
from raa215300_rtc_unregister_device().
Fixes: 7bce16630837 ("regulator: Add Renesas PMIC RAA215300 driver")
Cc: [email protected]
Signed-off-by: Biju Das <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
0 files changed, 0 insertions, 0 deletions
