summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-mpfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-09-29 18:54:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-09-29 18:54:21 -0700
commit551c722f40809618230001baccf219193e22fc5a (patch)
tree0bf196a56f701d3e13b0faa81ae4513728b9eb3b /drivers/rtc/rtc-mpfs.c
parenta243ede718463c7b481878656f1ff32a0ce0fd54 (diff)
parent055ef5ce9f67a6a3a1363fa663007f8196cc0fb8 (diff)
downloadlinux-next-stable.tar.gz
linux-next-stable.zip
Merge tag 'rtc-7.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linuxstable
Pull RTC fixes from Alexandre Belloni: "Mostly small issues found using AI. The efi change is to avoid a regression on some platforms Subsystem: - fix a possible information leak Drivers: - efi: restore alarm support with runtime capability probe" * tag 'rtc-7.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: spear: initialize IRQ state before requesting alarm IRQ rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe() rtc: ac100: Fix clock provider use-after-free on probe failure rtc: ac100: Assign .num before accessing .hws rtc: efi: restore alarm support with runtime capability probe rtc: dev: zero-initialize struct rtc_wkalrm to prevent information leak
Diffstat (limited to 'drivers/rtc/rtc-mpfs.c')
-rw-r--r--drivers/rtc/rtc-mpfs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-mpfs.c b/drivers/rtc/rtc-mpfs.c
index ece6de4a6adb..60596b0ea9d8 100644
--- a/drivers/rtc/rtc-mpfs.c
+++ b/drivers/rtc/rtc-mpfs.c
@@ -256,8 +256,12 @@ static int mpfs_rtc_probe(struct platform_device *pdev)
return ret;
}
+ clk = devm_clk_get(&pdev->dev, "rtcref");
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
+
/* prescaler hardware adds 1 to reg value */
- prescaler = clk_get_rate(devm_clk_get(&pdev->dev, "rtcref")) - 1;
+ prescaler = clk_get_rate(clk) - 1;
if (prescaler > MAX_PRESCALER_COUNT) {
dev_dbg(&pdev->dev, "invalid prescaler %lu\n", prescaler);
return -EINVAL;