Re: [PATCH] rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe()
From: Alexandre Belloni
Date: Mon Sep 21 2026 - 15:30:46 EST
On Sun, 06 Sep 2026 16:44:09 +0530, Manush Prajwal wrote:
> devm_clk_get(&pdev->dev, "rtcref")'s return value was passed straight
> into clk_get_rate() without checking it for an error first, unlike the
> "rtc" clock a few lines above which is correctly checked with
> IS_ERR(). clk_get_rate() only guards against a NULL clk, not an error
> pointer:
>
> if (!clk)
> return 0;
> ...
> rate = clk_core_get_rate_recalc(clk->core);
>
> [...]
Applied, thanks!
[1/1] rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe()
https://git.kernel.org/abelloni/c/ac41b05d15db
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com