From 7bfc50171800304c6e68968ff252889cde791f26 Mon Sep 17 00:00:00 2001 From: Sergey Shtylyov Date: Wed, 23 Sep 2026 23:14:39 +0300 Subject: [PATCH] ch9200: do return USB errors from control_write() Compared with control_read(), control_write() looks really strange: it ignores any errors returned by usb_control_msg(), always returning 0 instead, despite overriding a positive result of usb_control_msg() (indicating short transfer) to -EINVAL before doing that. Drop that dubious *return* and propagate USB errors to the callers... Signed-off-by: Sergey Shtylyov Link: https://patch.msgid.link/20260923201440.36966-3-s.shtylyov@auroraos.dev Signed-off-by: Jakub Kicinski --- drivers/net/usb/ch9200.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c index ab3cd3902ed7..5cd825f26420 100644 --- a/drivers/net/usb/ch9200.c +++ b/drivers/net/usb/ch9200.c @@ -168,8 +168,6 @@ static int control_write(struct usbnet *dev, unsigned char request, err = -EINVAL; kfree(buf); - return 0; - err_out: return err; }