]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
cfg80211: remove redundant check of !scan_plan
authorColin Ian King <colin.king@canonical.com>
Thu, 6 Sep 2018 09:58:44 +0000 (10:58 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 2 Oct 2018 07:56:29 +0000 (09:56 +0200)
The check for !scan_plan is redunant as this has been checked
in the proceeding statement and the code returns -ENOBUFS if
it is true. Remove the redundant check.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c

index d5f9b5235cdd26329486f7749ec95b7c40ad6dca..b4908bcb0d77e58dbcf55f389456bc71c4ca0540 100644 (file)
@@ -10690,8 +10690,7 @@ static int nl80211_send_wowlan_nd(struct sk_buff *msg,
                if (!scan_plan)
                        return -ENOBUFS;
 
-               if (!scan_plan ||
-                   nla_put_u32(msg, NL80211_SCHED_SCAN_PLAN_INTERVAL,
+               if (nla_put_u32(msg, NL80211_SCHED_SCAN_PLAN_INTERVAL,
                                req->scan_plans[i].interval) ||
                    (req->scan_plans[i].iterations &&
                     nla_put_u32(msg, NL80211_SCHED_SCAN_PLAN_ITERATIONS,