summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/eth-uclass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index fa3f5497a2..91d861be41 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -312,7 +312,8 @@ void eth_halt(void)
eth_get_ops(current)->stop(current);
priv = current->uclass_priv;
- priv->state = ETH_STATE_PASSIVE;
+ if (priv)
+ priv->state = ETH_STATE_PASSIVE;
}
int eth_is_active(struct udevice *dev)