[PATCH] net: ravb: Fix NULL pointer access
Marek Vasut
marek.vasut at gmail.com
Wed Sep 16 15:53:02 CEST 2020
On 9/15/20 4:10 PM, Biju Das wrote:
[...]
> +++ b/drivers/net/ravb.c
> @@ -438,7 +438,8 @@ static int ravb_config(struct udevice *dev)
>
> writel(mask, eth->iobase + RAVB_REG_ECMR);
>
> - phy->drv->writeext(phy, -1, 0x02, 0x08, (0x0f << 5) | 0x19);
> + if (phy->drv->writeext)
> + phy->drv->writeext(phy, -1, 0x02, 0x08, (0x0f << 5) | 0x19);
Shouldn't we rather move this into the PHY driver altogether ?
I _think_ this might be specific to some Micrel PHY.
More information about the U-Boot
mailing list