diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-04-16 12:23:05 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-04-18 10:36:41 -0400 |
commit | e757e7fa3a93afa54a1bf31953f458b0005e0910 (patch) | |
tree | 18772fd8dffb6a98d917b1f1e5144ac886d11bcc | |
parent | dc4060a5dc2557e6b5aa813bf5b73677299d62d2 (diff) |
PM / Domains: remove unnecessary unlikely()
WARN_ON() already contains an unlikely(), so it's not necessary to use
unlikely.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/base/power/domain.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 96a6dc9d305c..598a4e02aee1 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -391,11 +391,9 @@ int dev_pm_genpd_set_performance_state(struct device *dev, unsigned int state) | |||
391 | if (unlikely(!genpd->set_performance_state)) | 391 | if (unlikely(!genpd->set_performance_state)) |
392 | return -EINVAL; | 392 | return -EINVAL; |
393 | 393 | ||
394 | if (unlikely(!dev->power.subsys_data || | 394 | if (WARN_ON(!dev->power.subsys_data || |
395 | !dev->power.subsys_data->domain_data)) { | 395 | !dev->power.subsys_data->domain_data)) |
396 | WARN_ON(1); | ||
397 | return -EINVAL; | 396 | return -EINVAL; |
398 | } | ||
399 | 397 | ||
400 | genpd_lock(genpd); | 398 | genpd_lock(genpd); |
401 | 399 | ||