Thread (4 messages) flat view 4 messages, 4 authors, 2018-02-08
STALE3105d

[PATCH -next] cpufreq: scpi: fix error return code in scpi_cpufreq_init()

From: Wei Yongjun <hidden>
Date: 2018-01-23 02:09:02
Also in: kernel-janitors, linux-pm
Subsystem: cpu frequency scaling framework, system control & power/management interface (scpi/scmi) message protocol drivers, the rest · Maintainers: "Rafael J. Wysocki", Viresh Kumar, Sudeep Holla, Linus Torvalds

Fix to return a negative error code from the clk_get() error handling
case instead of 0, as done elsewhere in this function.

Fixes: 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
Signed-off-by: Wei Yongjun <redacted>
---
 drivers/cpufreq/scpi-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c
index 247fcbf..7095fc0 100644
--- a/drivers/cpufreq/scpi-cpufreq.c
+++ b/drivers/cpufreq/scpi-cpufreq.c
@@ -145,6 +145,7 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy)
 	if (IS_ERR(priv->clk)) {
 		dev_err(cpu_dev, "%s: Failed to get clk for cpu: %d\n",
 			__func__, cpu_dev->id);
+		ret = PTR_ERR(priv->clk);
 		goto out_free_cpufreq_table;
 	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help