[PATCH 2/3] clk: ignore -EPROTO in clk_get_enabled_if_available

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Mar 25 04:42:47 PDT 2026


Getting an SCMI clock can succeed with failure being postponed until the
driver attempts to enable the clock, at which time -EPROTO is returned.

Have clk_get_enabled_if_available() ignore that error code after
printing the warning, so the system can at least reach a shell.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/linux/clk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index 1cb8a1898e10..dc96a584398c 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -1292,7 +1292,7 @@ static inline struct clk *clk_get_enabled_if_available(struct device *dev,
 	ret = clk_enable(clk);
 	if (ret) {
 		clk_put(clk);
-		return ERR_PTR(ret);
+		return ret == -EPROTO ? NULL : ERR_PTR(ret);
 	}
 
 	return clk;
-- 
2.47.3




More information about the barebox mailing list