.. | .. |
---|
255 | 255 | static void dpd_reset(struct dfs_pattern_detector *dpd) |
---|
256 | 256 | { |
---|
257 | 257 | struct channel_detector *cd; |
---|
258 | | - if (!list_empty(&dpd->channel_detectors)) |
---|
259 | | - list_for_each_entry(cd, &dpd->channel_detectors, head) |
---|
260 | | - channel_detector_reset(dpd, cd); |
---|
| 258 | + list_for_each_entry(cd, &dpd->channel_detectors, head) |
---|
| 259 | + channel_detector_reset(dpd, cd); |
---|
261 | 260 | |
---|
262 | 261 | } |
---|
263 | 262 | static void dpd_exit(struct dfs_pattern_detector *dpd) |
---|
264 | 263 | { |
---|
265 | 264 | struct channel_detector *cd, *cd0; |
---|
266 | | - if (!list_empty(&dpd->channel_detectors)) |
---|
267 | | - list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) |
---|
268 | | - channel_detector_exit(dpd, cd); |
---|
| 265 | + list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) |
---|
| 266 | + channel_detector_exit(dpd, cd); |
---|
269 | 267 | kfree(dpd); |
---|
270 | 268 | } |
---|
271 | 269 | |
---|
.. | .. |
---|
333 | 331 | return false; |
---|
334 | 332 | |
---|
335 | 333 | /* delete all channel detectors for previous DFS domain */ |
---|
336 | | - if (!list_empty(&dpd->channel_detectors)) |
---|
337 | | - list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) |
---|
338 | | - channel_detector_exit(dpd, cd); |
---|
| 334 | + list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) |
---|
| 335 | + channel_detector_exit(dpd, cd); |
---|
339 | 336 | dpd->radar_spec = rt->radar_types; |
---|
340 | 337 | dpd->num_radar_types = rt->num_radar_types; |
---|
341 | 338 | |
---|