From: Jiri Slaby <jirislaby@kernel.org>
To: Atul Raut <rauji.raut@gmail.com>,
mickflemm@gmail.com, mcgrof@kernel.org, kvalo@kernel.org
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] ath5k: Fix debugfs_create_dir error checking
Date: Mon, 31 Jul 2023 07:20:13 +0200 [thread overview]
Message-ID: <e411e3c4-37ae-f5ea-b50b-4a5c0718c857@kernel.org> (raw)
In-Reply-To: <20230731023820.26571-1-rauji.raut@gmail.com>
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
prev parent reply other threads:[~2023-07-31 5:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 2:38 Atul Raut
2023-07-31 5:20 ` Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e411e3c4-37ae-f5ea-b50b-4a5c0718c857@kernel.org \
--to=jirislaby@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mickflemm@gmail.com \
--cc=rauji.raut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®