linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] carl9170: Fix error return -EAGAIN if not started
@ 2021-10-08  0:15 Colin King
  2021-10-08  5:58 ` Dan Carpenter
  2021-10-10  8:05 ` Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Colin King @ 2021-10-08  0:15 UTC (permalink / raw)
  To: Christian Lamparter, Kalle Valo, David S . Miller,
	Jakub Kicinski, John W . Linville, linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There is an error return path where the error return is being
assigned to err rather than count and the error exit path does
not return -EAGAIN as expected. Fix this by setting the error
return to variable count as this is the value that is returned
at the end of the function.

Addresses-Coverity: ("Unused value")
Fixes: 00c4da27a421 ("carl9170: firmware parser and debugfs code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/ath/carl9170/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/carl9170/debug.c b/drivers/net/wireless/ath/carl9170/debug.c
index bb40889d7c72..f163c6bdac8f 100644
--- a/drivers/net/wireless/ath/carl9170/debug.c
+++ b/drivers/net/wireless/ath/carl9170/debug.c
@@ -628,7 +628,7 @@ static ssize_t carl9170_debugfs_bug_write(struct ar9170 *ar, const char *buf,
 
 	case 'R':
 		if (!IS_STARTED(ar)) {
-			err = -EAGAIN;
+			count = -EAGAIN;
 			goto out;
 		}
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-10  8:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  0:15 [PATCH] carl9170: Fix error return -EAGAIN if not started Colin King
2021-10-08  5:58 ` Dan Carpenter
2021-10-08  7:31   ` Colin Ian King
2021-10-08  7:43     ` Dan Carpenter
2021-10-08 15:15     ` Christian Lamparter
2021-10-10  8:05 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).