@@ -168,7 +168,7 @@ static struct device_opp *_managed_opp(const struct device_node *np)
{
struct device_opp *dev_opp;
- list_for_each_entry_rcu(dev_opp, &dev_opp_list, node)
+ list_for_each_entry_rcu(dev_opp, &dev_opp_list, node) {
if (dev_opp->np == np) {
/*
* Multiple devices can point to the same OPP table and
@@ -177,11 +177,9 @@ static struct device_opp *_managed_opp(const struct device_node *np)
* But the OPPs will be considered as shared only if the
* OPP table contains a "opp-shared" property.
*/
- if (dev_opp->shared_opp)
- return dev_opp;
- else
- return NULL;
+ return dev_opp->shared_opp ? dev_opp : NULL;
}
+ }
return NULL;
}