Re: [PATCH v2] net: usb: net1080: add error handling to nc_vendor_write()

Andrew Lunn <[email protected]>
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
On Tue, Jul 28, 2026 at 05:12:50PM +0530, Ashwin Gundarapu wrote:
> >From 8c6ffd0b1a5ac33fb6a81cfd4d7d2c54462233bc Mon Sep 17 00:00:00 2001
> From: Ashwin Gundarapu <[email protected]>
> Date: Mon, 27 Jul 2026 19:34:16 +0530
> Subject: [PATCH] net: usb: net1080: add error handling to nc_vendor_write()
> 
> The nc_vendor_write() function currently ignores the return value of
> usbnet_write_cmd(). This can lead to silent failures when USB
> communication fails.
> 
> Change nc_vendor_write() and nc_register_write() to return int
> instead of void, and propagate the error from usbnet_write_cmd()
> back to the caller.
> 
> Also fix the callers in net1080_reset() to check the return value
> and handle errors appropriately. Remove an unused #if 0 block while
> at it.

This patch is doing multiple things. Please turn it into two patches
in a series.

    Andrew

---
pw-bot: cr
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.