diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-02-13 20:53:38 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-03-06 09:21:40 +0100 |
commit | d4f29978675d7d07e7bb9da30ed05ecf588820a0 (patch) | |
tree | ba847f6a0cadfa904dc8b631b5e834364ae634b6 /net/wireless/util.c | |
parent | ae44b502669d0cd1f167cdb48994292aa20fd3dd (diff) | |
download | linux-d4f29978675d7d07e7bb9da30ed05ecf588820a0.tar.bz2 |
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/util.c')
-rw-r--r-- | net/wireless/util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 68e5f2ecee1a..daef500a7b64 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -914,11 +914,11 @@ void cfg80211_upload_connect_keys(struct wireless_dev *wdev) netdev_err(dev, "failed to set key %d\n", i); continue; } - if (wdev->connect_keys->def == i) - if (rdev_set_default_key(rdev, dev, i, true, true)) { - netdev_err(dev, "failed to set defkey %d\n", i); - continue; - } + if (wdev->connect_keys->def == i && + rdev_set_default_key(rdev, dev, i, true, true)) { + netdev_err(dev, "failed to set defkey %d\n", i); + continue; + } } kzfree(wdev->connect_keys); |