diff options
author | Wang Zhang <silver_code@hust.edu.cn> | 2023-04-21 17:10:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-23 14:37:27 +0200 |
commit | b148b9abc8444c9e0579a6bbe47b2da6adf5a150 (patch) | |
tree | aa63670e701ad5a97a7b9f5ed512837c1ea19ca3 /drivers | |
parent | rxrpc: Fix potential race in error handling in afs_make_call() (diff) | |
download | linux-b148b9abc8444c9e0579a6bbe47b2da6adf5a150.tar.xz linux-b148b9abc8444c9e0579a6bbe47b2da6adf5a150.zip |
net: ethernet: mediatek: remove return value check of `mtk_wed_hw_add_debugfs`
Smatch complains that:
mtk_wed_hw_add_debugfs() warn: 'dir' is an error pointer or valid
Debugfs checks are generally not supposed to be checked
for errors and it is not necessary here.
fix it by just deleting the dead code.
Signed-off-by: Wang Zhang <silver_code@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_wed_debugfs.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c index 56f663439721..b244c02c5b51 100644 --- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c +++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c @@ -252,8 +252,6 @@ void mtk_wed_hw_add_debugfs(struct mtk_wed_hw *hw) snprintf(hw->dirname, sizeof(hw->dirname), "wed%d", hw->index); dir = debugfs_create_dir(hw->dirname, NULL); - if (!dir) - return; hw->debugfs_dir = dir; debugfs_create_u32("regidx", 0600, dir, &hw->debugfs_reg); |