Skip to content

Commit

Permalink
net: usb: lan78xx: Improve error handling in EEPROM and OTP operations
Browse files Browse the repository at this point in the history
Refine error handling in EEPROM and OTP read/write functions by:
- Return error values immediately upon detection.
- Avoid overwriting correct error codes with `-EIO`.
- Preserve initial error codes as they were appropriate for specific
  failures.
- Use `-ETIMEDOUT` for timeout conditions instead of `-EIO`.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241204084142.1152696-7-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Oleksij Rempel authored and Jakub Kicinski committed Dec 7, 2024
1 parent 32ee0dc commit 8b1b2ca
Showing 1 changed file with 152 additions and 88 deletions.
Loading

0 comments on commit 8b1b2ca

Please sign in to comment.