git: 9d765453b0a9 - main - urtw: return error of usb_error_t

Gleb Smirnoff <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a764a7c.210a5.1740ca8__47662.7067708009$1786137229$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=9d765453b0a93f2ec4ca2b91c3a20ec909bd3b6d

commit 9d765453b0a93f2ec4ca2b91c3a20ec909bd3b6d
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2026-08-07 17:51:34 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2026-08-07 21:13:26 +0000

    urtw: return error of usb_error_t
    
    Found with:     clang -Werror=assign-enum
---
 sys/dev/usb/wlan/if_urtw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c
index 86cf4c653ae7..17dc19bcab67 100644
--- a/sys/dev/usb/wlan/if_urtw.c
+++ b/sys/dev/usb/wlan/if_urtw.c
@@ -2757,7 +2757,7 @@ urtw_8225_rf_set_sens(struct urtw_softc *sc, int sens)
 	usb_error_t error;
 
 	if (sens < 0 || sens > 6)
-		return -1;
+		return USB_ERR_INVAL;
 
 	if (sens > 4)
 		urtw_8225_write(sc,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.