Skip to content

Commit

Permalink
cpufreq: unicore32: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
Browse files Browse the repository at this point in the history
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Duan Jiong authored and Rafael J. Wysocki committed Apr 21, 2014
1 parent a798c10 commit 8ab4e2b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/cpufreq/unicore2-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ static int __init ucv2_cpu_init(struct cpufreq_policy *policy)
policy->max = policy->cpuinfo.max_freq = 1000000;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->clk = clk_get(NULL, "MAIN_CLK");
if (IS_ERR(policy->clk))
return PTR_ERR(policy->clk);
return 0;
return PTR_ERR_OR_ZERO(policy->clk);
}

static struct cpufreq_driver ucv2_driver = {
Expand Down

0 comments on commit 8ab4e2b

Please sign in to comment.