From: Zhen Lei <thunder.leizhen@huawei.com>
To: Kalle Valo <kvalo@kernel.org>, Jeff Johnson <jjohnson@kernel.org>,
<linux-wireless@vger.kernel.org>, <ath11k@lists.infradead.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>,
Jeff Johnson <quic_jjohnson@quicinc.com>
Subject: [PATCH v2] ath11k: remove error checking for debugfs_create_file()
Date: Fri, 25 Oct 2024 14:42:35 +0800 [thread overview]
Message-ID: <20241025064235.382-1-thunder.leizhen@huawei.com> (raw)
Driver ath11k can work fine even if the debugfs files fail to be created.
Therefore, the return value check of debugfs_create_file() should be
ignored, as it says.
Suggested-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/net/wireless/ath/ath11k/spectral.c | 24 ----------------------
1 file changed, 24 deletions(-)
v1 --> v2:
Remove error checking for debugfs_create_file() instead of fixing it.
diff --git a/drivers/net/wireless/ath/ath11k/spectral.c b/drivers/net/wireless/ath/ath11k/spectral.c
index 79e091134515b43..a6426eda023a944 100644
--- a/drivers/net/wireless/ath/ath11k/spectral.c
+++ b/drivers/net/wireless/ath/ath11k/spectral.c
@@ -925,8 +925,6 @@ void ath11k_spectral_deinit(struct ath11k_base *ab)
static inline int ath11k_spectral_debug_register(struct ath11k *ar)
{
- int ret;
-
ar->spectral.rfs_scan = relay_open("spectral_scan",
ar->debug.debugfs_pdev,
ATH11K_SPECTRAL_SUB_BUFF_SIZE(ar->ab),
@@ -942,40 +940,18 @@ static inline int ath11k_spectral_debug_register(struct ath11k *ar)
0600,
ar->debug.debugfs_pdev, ar,
&fops_scan_ctl);
- if (!ar->spectral.scan_ctl) {
- ath11k_warn(ar->ab, "failed to open debugfs in pdev %d\n",
- ar->pdev_idx);
- ret = -EINVAL;
- goto debug_unregister;
- }
ar->spectral.scan_count = debugfs_create_file("spectral_count",
0600,
ar->debug.debugfs_pdev, ar,
&fops_scan_count);
- if (!ar->spectral.scan_count) {
- ath11k_warn(ar->ab, "failed to open debugfs in pdev %d\n",
- ar->pdev_idx);
- ret = -EINVAL;
- goto debug_unregister;
- }
ar->spectral.scan_bins = debugfs_create_file("spectral_bins",
0600,
ar->debug.debugfs_pdev, ar,
&fops_scan_bins);
- if (!ar->spectral.scan_bins) {
- ath11k_warn(ar->ab, "failed to open debugfs in pdev %d\n",
- ar->pdev_idx);
- ret = -EINVAL;
- goto debug_unregister;
- }
return 0;
-
-debug_unregister:
- ath11k_spectral_debug_unregister(ar);
- return ret;
}
int ath11k_spectral_init(struct ath11k_base *ab)
--
2.34.1
next reply other threads:[~2024-10-25 6:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 6:42 Zhen Lei [this message]
2024-10-28 14:02 ` [PATCH v2] ath11k: remove error checking for debugfs_create_file() Kalle Valo
2024-10-28 14:30 ` Jeff Johnson
2024-10-29 2:05 ` Leizhen (ThunderTown)
2024-10-29 3:41 ` Julian Calaby
2024-10-29 14:27 ` Jeff Johnson
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=20241025064235.382-1-thunder.leizhen@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=ath11k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_jjohnson@quicinc.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