[PATCH] mdio_bus: add NULL check to mdiobus_read/mdiobus_write
Sascha Hauer
s.hauer at pengutronix.de
Mon Oct 14 04:13:15 PDT 2024
On Mon, 14 Oct 2024 10:55:06 +0200, Ahmad Fatoum wrote:
> These functions shouldn't be called with a NULL pointer as argument in
> the first place, but this happened at least twice so far[1][2], because
> drivers weren't tested in fixed-link setups without PHYs.
>
> To improve user experience, let's return -EIO instead of crashing
> outright. The proper fix is still to adapt these drivers, so they
> do not try to access non-existent PHYs.
>
> [...]
Applied, thanks!
[1/1] mdio_bus: add NULL check to mdiobus_read/mdiobus_write
https://git.pengutronix.de/cgit/barebox/commit/?id=36d1dd4afe57 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list