Skip to content

Commit 61d7ddd

Browse files
miquelraynalStefan-Schmidt
authored andcommitted
mac802154: Fix an always true condition
At this stage we simply do not care about the delayed work value, because active scan is not yet supported, so we can blindly queue another work once a beacon has been sent. It fixes a smatch warning: mac802154_beacon_worker() warn: always true condition '(local->beacon_interval >= 0) => (0-u32max >= 0)' Fixes: 3accf47 ("mac802154: Handle basic beaconing") Reported-by: kernel test robot <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
1 parent 1375e3b commit 61d7ddd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

net/mac802154/scan.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,8 @@ void mac802154_beacon_worker(struct work_struct *work)
383383
dev_err(&sdata->dev->dev,
384384
"Beacon could not be transmitted (%d)\n", ret);
385385

386-
if (local->beacon_interval >= 0)
387-
queue_delayed_work(local->mac_wq, &local->beacon_work,
388-
local->beacon_interval);
386+
queue_delayed_work(local->mac_wq, &local->beacon_work,
387+
local->beacon_interval);
389388
}
390389

391390
int mac802154_stop_beacons_locked(struct ieee802154_local *local,

0 commit comments

Comments
 (0)