diff options
author | Wang Jikai <wangjikai@hust.edu.cn> | 2023-04-21 09:22:00 +0000 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-05-05 15:03:09 +0300 |
commit | f3dc7bb037d813ab7da84f488dd485f0fce66347 (patch) | |
tree | 7dd8788d2d1e68841346a271e5b928dcf30b81f4 | |
parent | c401bde6ead489938385867ce3a6d5faf9fb6aba (diff) | |
download | lwn-f3dc7bb037d813ab7da84f488dd485f0fce66347.tar.gz lwn-f3dc7bb037d813ab7da84f488dd485f0fce66347.zip |
wifi: mt7601u: delete dead code checking debugfs returns
Smatch reports that:
drivers/net/wireless/mediatek/mt7601u/debugfs.c:130
mt7601u_init_debugfs() warn: 'dir' is an error pointer or valid".
Debugfs code is not supposed to need error checking so instead of
changing this to if (IS_ERR()) the correct thing is to just delete
the dead code.
Signed-off-by: Wang Jikai <wangjikai@hust.edu.cn>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230421092200.24456-1-wangjikai@hust.edu.cn
-rw-r--r-- | drivers/net/wireless/mediatek/mt7601u/debugfs.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt7601u/debugfs.c b/drivers/net/wireless/mediatek/mt7601u/debugfs.c index 230b0e1061a7..dbddf256921b 100644 --- a/drivers/net/wireless/mediatek/mt7601u/debugfs.c +++ b/drivers/net/wireless/mediatek/mt7601u/debugfs.c @@ -127,8 +127,6 @@ void mt7601u_init_debugfs(struct mt7601u_dev *dev) struct dentry *dir; dir = debugfs_create_dir("mt7601u", dev->hw->wiphy->debugfsdir); - if (!dir) - return; debugfs_create_u8("temperature", 0400, dir, &dev->raw_temp); debugfs_create_u32("temp_mode", 0400, dir, &dev->temp_mode); |