Re: [PATCH net-next v1 07/21] net: usb: lan78xx: Add error handling to lan78xx_init_ltm

From: Andrew Lunn
Date: Tue Dec 03 2024 - 15:37:09 EST


On Tue, Dec 03, 2024 at 08:21:40AM +0100, Oleksij Rempel wrote:
> Convert `lan78xx_init_ltm` to return error codes and handle errors
> properly. Previously, errors during the LTM initialization process were
> not propagated, potentially leading to undetected issues. This patch
> ensures:
>
> - Errors in `lan78xx_read_reg` and `lan78xx_write_reg` are checked and
> handled.
> - Errors are logged with detailed messages using `%pe` for clarity.
> - The function exits immediately on error, returning the error code.
>
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew