summaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-02-13 20:53:38 +0100
committerJohannes Berg <johannes.berg@intel.com>2017-03-06 09:21:40 +0100
commitd4f29978675d7d07e7bb9da30ed05ecf588820a0 (patch)
treeba847f6a0cadfa904dc8b631b5e834364ae634b6 /net/wireless/core.c
parentwireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers (diff)
downloadlinux-d4f29978675d7d07e7bb9da30ed05ecf588820a0.tar.xz
linux-d4f29978675d7d07e7bb9da30ed05ecf588820a0.zip
cfg80211: combine two nested ifs into a single condition
Combine two instances of having two nested if statements into a single one with a combined condition to reduce the indentation. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 04143df20f7f..76e664144c8e 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1216,12 +1216,12 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
*/
if ((wdev->iftype == NL80211_IFTYPE_STATION ||
wdev->iftype == NL80211_IFTYPE_P2P_CLIENT) &&
- rdev->ops->set_power_mgmt)
- if (rdev_set_power_mgmt(rdev, dev, wdev->ps,
- wdev->ps_timeout)) {
- /* assume this means it's off */
- wdev->ps = false;
- }
+ rdev->ops->set_power_mgmt &&
+ rdev_set_power_mgmt(rdev, dev, wdev->ps,
+ wdev->ps_timeout)) {
+ /* assume this means it's off */
+ wdev->ps = false;
+ }
break;
case NETDEV_UNREGISTER:
/*