projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: zynq: Do not select options if SPL is not enabled
[oweals/u-boot.git]
/
common
/
miiphyutil.c
diff --git
a/common/miiphyutil.c
b/common/miiphyutil.c
index e499b588368fd9dcf9f04a6619976923e9d30a53..7e41957185072123a81468309081ec4586730867 100644
(file)
--- a/
common/miiphyutil.c
+++ b/
common/miiphyutil.c
@@
-114,6
+114,8
@@
void miiphy_register(const char *name,
if (new_dev == NULL || ldev == NULL) {
printf("miiphy_register: cannot allocate memory for '%s'\n",
name);
if (new_dev == NULL || ldev == NULL) {
printf("miiphy_register: cannot allocate memory for '%s'\n",
name);
+ free(ldev);
+ mdio_free(new_dev);
return;
}
return;
}
@@
-159,7
+161,7
@@
void mdio_free(struct mii_dev *bus)
int mdio_register(struct mii_dev *bus)
{
int mdio_register(struct mii_dev *bus)
{
- if (!bus || !bus->
name || !bus->
read || !bus->write)
+ if (!bus || !bus->read || !bus->write)
return -1;
/* check if we have unique name */
return -1;
/* check if we have unique name */