Thread (6 messages) flat view 6 messages, 4 authors, 2021-10-10
STALE1789d

[PATCH] carl9170: Fix error return -EAGAIN if not started

From: Colin King <hidden>
Date: 2021-10-08 00:16:03
Also in: kernel-janitors, lkml, netdev
Subsystem: atheros ath generic utilities, carl9170 linux community wireless driver, the rest · Maintainers: Jeff Johnson, Christian Lamparter, Linus Torvalds

From: Colin Ian King <redacted>

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help