]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath10k: Fix an error code problem in ath10k_dbg_sta_write_peer_debug_trigger()
authorSu Hui <suhui@nfschina.com>
Mon, 22 Apr 2024 03:42:44 +0000 (11:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:32:06 +0000 (13:32 +0200)
[ Upstream commit c511a9c12674d246916bb16c479d496b76983193 ]

Clang Static Checker (scan-build) warns:

drivers/net/wireless/ath/ath10k/debugfs_sta.c:line 429, column 3
Value stored to 'ret' is never read.

Return 'ret' rather than 'count' when 'ret' stores an error code.

Fixes: ee8b08a1be82 ("ath10k: add debugfs support to get per peer tids log via tracing")
Signed-off-by: Su Hui <suhui@nfschina.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240422034243.938962-1-suhui@nfschina.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/debugfs_sta.c

index 367539f2c3700612cb69f72c94653d8c012c9477..f7912c72cba34a6037f3fcafb82dad85a1144208 100644 (file)
@@ -438,7 +438,7 @@ ath10k_dbg_sta_write_peer_debug_trigger(struct file *file,
        }
 out:
        mutex_unlock(&ar->conf_mutex);
-       return count;
+       return ret ?: count;
 }
 
 static const struct file_operations fops_peer_debug_trigger = {