[PATCH] rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe()

Alexandre Belloni alexandre.belloni at bootlin.com
Mon Sep 21 12:28:28 PDT 2026


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



More information about the linux-riscv mailing list