Skip to content

Commit f080864

Browse files
zhengchaoshaokuba-moo
authored andcommitted
net: remove redundant NULL check in remove_xps_queue()
There are currently two paths that call remove_xps_queue(): 1. __netif_set_xps_queue -> remove_xps_queue 2. clean_xps_maps -> remove_xps_queue_cpu -> remove_xps_queue There is no need to check dev_maps in remove_xps_queue() because dev_maps has been checked on these two paths. Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Link: https://lore.kernel.org/r/20230724023735.2751602-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent a5a91f5 commit f080864

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/core/dev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,8 +2384,7 @@ static bool remove_xps_queue(struct xps_dev_maps *dev_maps,
23842384
struct xps_map *map = NULL;
23852385
int pos;
23862386

2387-
if (dev_maps)
2388-
map = xmap_dereference(dev_maps->attr_map[tci]);
2387+
map = xmap_dereference(dev_maps->attr_map[tci]);
23892388
if (!map)
23902389
return false;
23912390

0 commit comments

Comments
 (0)