cpufreq: scpi: fix error return code in scpi_cpufreq_init()

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/0725390da9fb5add90a6ee5d5bbe58b5f47b25ac
Commit:     0725390da9fb5add90a6ee5d5bbe58b5f47b25ac
Parent:     eb85c50c24cf3e96f9aa01fd3e6219ad36845a96
Refname:    refs/heads/master
Author:     Wei Yongjun <[email protected]>
AuthorDate: Tue Jan 23 02:09:02 2018 +0000
Committer:  Rafael J. Wysocki <[email protected]>
CommitDate: Thu Feb 8 10:21:15 2018 +0100

    cpufreq: scpi: fix error return code in scpi_cpufreq_init()
    
    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 <[email protected]>
    Acked-by: Viresh Kumar <[email protected]>
    Acked-by: Sudeep Holla <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
---
 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 efe32cbefa06..c32a833e1b00 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;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.