aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ucc_geth.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-02 11:17:41 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-04-02 11:17:41 +0900
commitc4361bb64b81f5b81a7a08d58654493385a2f2b2 (patch)
tree8741c0b60ddfbc3fc4e17c8d200f6aa6ff32cca0 /drivers/net/ucc_geth.c
parent46368fa05164e1afdc1401294908cf30c6d8d981 (diff)
parent833bb3046b6cb320e775ea2160ddca87d53260d5 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r--drivers/net/ucc_geth.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 86a479f61c0..933fcfbf35e 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3648,15 +3648,16 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
mdio = of_get_parent(phy);
if (mdio == NULL)
- return -1;
+ return -ENODEV;
err = of_address_to_resource(mdio, 0, &res);
- of_node_put(mdio);
-
- if (err)
- return -1;
+ if (err) {
+ of_node_put(mdio);
+ return err;
+ }
fsl_pq_mdio_bus_name(bus_name, mdio);
+ of_node_put(mdio);
snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id),
"%s:%02x", bus_name, *prop);
}