net: dsa: microchip: Add error handling for ksz_switch_macaddr_get()
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 26 Oct 2023 05:10:49 +0000 (07:10 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Oct 2023 21:43:53 +0000 (14:43 -0700)
commit818cdb0f4b3834b342a32040ba0ee12fefb548e0
tree8331354d38571729f8df56c380aea5ee9a0d0d95
parent78c21fca0b391792cb105e4a505bcba88ea737e1
net: dsa: microchip: Add error handling for ksz_switch_macaddr_get()

Enhance the ksz_switch_macaddr_get() function to handle errors that may
occur during the call to ksz_write8(). Specifically, this update checks
the return value of ksz_write8(), which may fail if regmap ranges
validation is not passed and returns the error code.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20231026051051.2316937-4-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz_common.c