summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorLiu Dalin <liudalin@kylinsec.com.cn>2026-08-27 16:03:18 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-10-01 09:44:31 +0200
commitc60478875a445dee1206aad6285c18cd8c91f7f2 (patch)
tree9ba10eb7ef4d13a6849972c3e9fc62e765463f0a /tools/perf/scripts/python/bin
parentcb8a6249236fd970fc3418d5d2b27dc37376f3ff (diff)
downloadlinux-next-c60478875a445dee1206aad6285c18cd8c91f7f2.tar.gz
linux-next-c60478875a445dee1206aad6285c18cd8c91f7f2.zip
rtc: ftrtc010: fix clock resource leak on probe failure
When devm_rtc_register_device() fails, ftrtc010_rtc_probe() returns the error directly without releasing clocks obtained via clk_prepare_enable(). This leaks both extclk and pclk resources, which may prevent subsequent probe attempts or module removal. Capture the return value and jump to the error handling path to properly release clocks via clk_disable_unprepare(). Fixes smatch warnings: - drivers/rtc/rtc-ftrtc010.c:189 ftrtc010_rtc_probe() warn: 'rtc->extclk' from clk_prepare_enable() not released on lines: 183. - drivers/rtc/rtc-ftrtc010.c:189 ftrtc010_rtc_probe() warn: 'rtc->pclk' from clk_prepare_enable() not released on lines: 183. Fixes: fdcfd854333b ("rtc: rework rtc_register_device() resource management") Assisted-by: smatch:2.0 [static analysis] Signed-off-by: Liu Dalin <liudalin@kylinsec.com.cn> Reviewed-by: Linus Walleij <linusw@kernel.org> Tested-by: Liu Dalin <liudalin@kylinsec.com.cn> Link: https://patch.msgid.link/AC51B5F2C5FFEBB0+20260827080320.3351155-2-liudalin@kylinsec.com.cn Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions