[PATCH 1/1] clk: scmi: Add error message if SCMI protocol handler could not be found

From: Alexander Stein

Date: Wed Mar 25 2026 - 12:51:32 EST


In case the protocol could not be found an error message is better than
probe just failing with error code -22.

Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
---
drivers/clk/clk-scmi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c
index 7c562559ad8bb..c32b15b272ccd 100644
--- a/drivers/clk/clk-scmi.c
+++ b/drivers/clk/clk-scmi.c
@@ -384,7 +384,8 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
scmi_proto_clk_ops =
handle->devm_protocol_get(sdev, SCMI_PROTOCOL_CLOCK, &ph);
if (IS_ERR(scmi_proto_clk_ops))
- return PTR_ERR(scmi_proto_clk_ops);
+ return dev_err_probe(dev, PTR_ERR(scmi_proto_clk_ops),
+ "No SCMI protocol handler found\n");

count = scmi_proto_clk_ops->count_get(ph);
if (count < 0) {
--
2.43.0