aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2023-07-24 10:37:35 +0800
committerJakub Kicinski <kuba@kernel.org>2023-07-25 19:52:08 -0700
commitf080864a9d906678e050f10f0e81add711b86fbc (patch)
treef01deca58c4c916287622d29eb7b9b6ed4a68252 /net/core/dev.c
parenta5a91f546444940f3d75e2edf3c53b4d235f0557 (diff)
downloadlinux-f080864a9d906678e050f10f0e81add711b86fbc.tar.gz
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 8e7d0cb540cdb2..e7ffcfa037f799 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2384,8 +2384,7 @@ static bool remove_xps_queue(struct xps_dev_maps *dev_maps,
struct xps_map *map = NULL;
int pos;
- if (dev_maps)
- map = xmap_dereference(dev_maps->attr_map[tci]);
+ map = xmap_dereference(dev_maps->attr_map[tci]);
if (!map)
return false;