Re: [PATCH v2] net: usb: net1080: add error handling to nc_vendor_write()
From: Andrew Lunn
Date: Tue Jul 28 2026 - 17:09:38 EST
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 <linuxuser509@xxxxxxxxxxx>
> 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