PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 12 Aug 2015 10:29:39 +0000 (15:59 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 28 Aug 2015 14:05:35 +0000 (16:05 +0200)
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c

index 803d8b7ced895e66cd72ba1c9f282500657f1c62..bb703b5ebaff931cea42feb1aff25b7d665cfb27 100644 (file)
@@ -204,7 +204,7 @@ static struct device_opp *_find_device_opp(struct device *dev)
 {
        struct device_opp *dev_opp;
 
-       if (unlikely(IS_ERR_OR_NULL(dev))) {
+       if (IS_ERR_OR_NULL(dev)) {
                pr_err("%s: Invalid parameters\n", __func__);
                return ERR_PTR(-EINVAL);
        }
@@ -239,7 +239,7 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
        opp_rcu_lockdep_assert();
 
        tmp_opp = rcu_dereference(opp);
-       if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available)
+       if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available)
                pr_err("%s: Invalid parameters\n", __func__);
        else
                v = tmp_opp->u_volt;
@@ -271,7 +271,7 @@ unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
        opp_rcu_lockdep_assert();
 
        tmp_opp = rcu_dereference(opp);
-       if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available)
+       if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available)
                pr_err("%s: Invalid parameters\n", __func__);
        else
                f = tmp_opp->rate;