public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH -next] cpufreq: scpi: fix error return code in scpi_cpufreq_init()
@ 2018-01-23  2:09 Wei Yongjun
  2018-01-23  3:15 ` Viresh Kumar
  2018-01-23 10:14 ` Sudeep Holla
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2018-01-23  2:09 UTC (permalink / raw)
  To: linux-arm-kernel

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 <weiyongjun1@huawei.com>
---
 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;
 	}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-08 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23  2:09 [PATCH -next] cpufreq: scpi: fix error return code in scpi_cpufreq_init() Wei Yongjun
2018-01-23  3:15 ` Viresh Kumar
2018-01-23 10:14 ` Sudeep Holla
2018-02-08 10:05   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox