mwifiex: no need to check return value of debugfs_create functions
PATCH 1/1 mwifiex: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.
Cc Amitkumar Karwar <[email protected]>
Cc Nishant Sarmukadam <[email protected]>
Cc Ganapathi Bhat <[email protected]>
Cc Xinming Hu <[email protected]>
Cc Kalle Valo <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- drivers/net/wireless/marvell/mwifiex/debugfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/marvell/mwifiex/debugfs.c +2 -3
@@ -922,9 +922,8 @@ mwifiex_reset_write(struct file *file, }#define MWIFIEX_DFS_ADD_FILE (name) do { \ - if (!debugfs_create_file(#name, 0644, priv->dfs_dev_dir, \ - priv, &mwifiex_dfs_##name##_fops)) \ - return; \ + debugfs_create_file(#name, 0644, priv->dfs_dev_dir, priv, \ + &mwifiex_dfs_##name##_fops); \ } while (0);#define MWIFIEX_DFS_FILE_OPS (name) \
Signature · 1 line
2.20.1
Quoted 11 lines · Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.
Cc Amitkumar Karwar <[email protected]>Cc Nishant Sarmukadam <[email protected]>Cc Ganapathi Bhat <[email protected]>Cc Xinming Hu <[email protected]>Cc Kalle Valo <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Patch applied to wireless-drivers-next.git, thanks.
a0b449dc4c67 mwifiex: no need to check return value of debugfs_create functions
Signature · 3 lines
https://patchwork.kernel.org/patch/10775747/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches