Re: [PATCH] cpufreq: unicore32: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 April 2014 13:29, Duan Jiong <duanj.fnst@xxxxxxxxxxxxxx> wrote:
> 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@xxxxxxxxxxxxxx>
> ---
>  drivers/cpufreq/unicore2-cpufreq.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/cpufreq/unicore2-cpufreq.c b/drivers/cpufreq/unicore2-cpufreq.c
> index 8d045af..6f9dfa8 100644
> --- a/drivers/cpufreq/unicore2-cpufreq.c
> +++ b/drivers/cpufreq/unicore2-cpufreq.c
> @@ -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);

Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux