projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
warp7: MAINTAINERS: Add an entry for warp7_bl33_defconfig
[oweals/u-boot.git]
/
net
/
eth-uclass.c
diff --git
a/net/eth-uclass.c
b/net/eth-uclass.c
index 240b5965345543ff679ae925a2401f9c254b6e8b..91d861be41365459a7bd5c114376b59b8c5a7652 100644
(file)
--- a/
net/eth-uclass.c
+++ b/
net/eth-uclass.c
@@
-1,9
+1,8
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2001-2015
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
* Joe Hershberger, National Instruments
/*
* (C) Copyright 2001-2015
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
* Joe Hershberger, National Instruments
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
*/
#include <common.h>
@@
-308,12
+307,13
@@
void eth_halt(void)
struct eth_device_priv *priv;
current = eth_get_dev();
struct eth_device_priv *priv;
current = eth_get_dev();
- if (!current || !
device
_active(current))
+ if (!current || !
eth_is
_active(current))
return;
eth_get_ops(current)->stop(current);
priv = current->uclass_priv;
return;
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)
}
int eth_is_active(struct udevice *dev)
@@
-396,7
+396,7
@@
int eth_initialize(void)
* This is accomplished by attempting to probe each device and calling
* their write_hwaddr() operation.
*/
* This is accomplished by attempting to probe each device and calling
* their write_hwaddr() operation.
*/
- uclass_first_device(UCLASS_ETH, &dev);
+ uclass_first_device
_check
(UCLASS_ETH, &dev);
if (!dev) {
printf("No ethernet found.\n");
bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
if (!dev) {
printf("No ethernet found.\n");
bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
@@
-425,7
+425,7
@@
int eth_initialize(void)
eth_write_hwaddr(dev);
eth_write_hwaddr(dev);
- uclass_next_device(&dev);
+ uclass_next_device
_check
(&dev);
num_devices++;
} while (dev);
num_devices++;
} while (dev);