summaryrefslogtreecommitdiff
path: root/net/eth-uclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/eth-uclass.c')
-rw-r--r--net/eth-uclass.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 8c3f9cc31b..f41da4b37b 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -93,6 +93,8 @@ struct udevice *eth_get_dev(void)
if (eth_errno)
eth_errno = uclass_first_device_err(UCLASS_ETH,
&uc_priv->current);
+ if (eth_errno)
+ uc_priv->current = NULL;
}
return uc_priv->current;
}