diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/eth-uclass.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 0f6b45b002c..f41da4b37b3 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -91,8 +91,10 @@ struct udevice *eth_get_dev(void) eth_errno = uclass_get_device_by_seq(UCLASS_ETH, 0, &uc_priv->current); if (eth_errno) - eth_errno = uclass_first_device(UCLASS_ETH, - &uc_priv->current); + eth_errno = uclass_first_device_err(UCLASS_ETH, + &uc_priv->current); + if (eth_errno) + uc_priv->current = NULL; } return uc_priv->current; } |