diff mbox

[2/3] cpufreq: cpu0: Removes unnecessary IS_ERR check on clk

Message ID 1409209212-18730-2-git-send-email-pramod.gurav@smartplayin.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Pramod Gurav Aug. 28, 2014, 7 a.m. UTC
This removes unnecessary IS_ERR check on clk when in failure path
as execution wont reach till there with clk being a err.

CC: Shawn Guo <shawn.guo@linaro.org>
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>
CC: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
 drivers/cpufreq/cpufreq-cpu0.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Shawn Guo Aug. 28, 2014, 5:31 a.m. UTC | #1
On Thu, Aug 28, 2014 at 12:00:11AM -0700, Pramod Gurav wrote:
> This removes unnecessary IS_ERR check on clk when in failure path
> as execution wont reach till there with clk being a err.
> 
> CC: Shawn Guo <shawn.guo@linaro.org>
> CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> CC: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>

Acked-by: Shawn Guo <shawn.guo@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index e1574f8..0652cea 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -214,8 +214,7 @@  static int cpu0_cpufreq_probe(struct platform_device *pdev)
 out_free_table:
 	dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
 out_put_clk:
-	if (!IS_ERR(cpu_clk))
-		clk_put(cpu_clk);
+	clk_put(cpu_clk);
 out_put_reg:
 	if (!IS_ERR(cpu_reg))
 		regulator_put(cpu_reg);