lkml.org 
[lkml]   [2023]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ath5k: Fix debugfs_create_dir error checking
From
On 31. 07. 23, 4:38, Atul Raut wrote:
> The debugfs_create_dir function returns ERR_PTR
> in case of error and the correct way to check an
> error is 'IS_ERR' inline function.
> This patch will replace the null-comparison with IS_ERR
>
> This issue was found with the help of Coccinelle.
> ./drivers/net/wireless/ath/ath5k/debug.c:985:6-12: Wrong debugfs call error processing on line 985
>
> Signed-off-by: Atul Raut <rauji.raut@gmail.com>
> ---
> drivers/net/wireless/ath/ath5k/debug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
> index 4b41160e5d38..08058b3f7e22 100644
> --- a/drivers/net/wireless/ath/ath5k/debug.c
> +++ b/drivers/net/wireless/ath/ath5k/debug.c
> @@ -982,7 +982,7 @@ ath5k_debug_init_device(struct ath5k_hw *ah)
> ah->debug.level = ath5k_debug;
>
> phydir = debugfs_create_dir("ath5k", ah->hw->wiphy->debugfsdir);
> - if (!phydir)
> + if (IS_ERR(phydir))

Already fixed by:
https://patchwork.kernel.org/project/linux-wireless/patch/20230714081619.2032-1-duminjie@vivo.com/

--
js
suse labs

\
 
 \ /
  Last update: 2023-07-31 07:21    [W:1.189 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site