Re: [PATCH net v1 1/1] net: usb: lan78xx: Sanitize return values of register read/write functions
From: Mark Brown
Date: Mon Mar 10 2025 - 09:18:03 EST
On Fri, Mar 07, 2025 at 11:12:23AM +0100, Oleksij Rempel wrote:
> usb_control_msg() returns the number of transferred bytes or a negative
> error code. The current implementation propagates the transferred byte
> count, which is unintended. This affects code paths that assume a
> boolean success/failure check, such as the EEPROM detection logic.
>
> Fix this by ensuring lan78xx_read_reg() and lan78xx_write_reg() return
> only 0 on success and preserve negative error codes.
Tested-by: Mark Brown <broonie@xxxxxxxxxx>
This fixes NFS boot on the Raspberry Pi 3+, it'd be good to get it into
v6.14.
Attachment:
signature.asc
Description: PGP signature