From: Sergei Shtylyov Date: Sat, 16 Apr 2016 22:05:19 +0000 (+0300) Subject: of_mdio: make of_mdiobus_register_{device|phy}() *void* X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b520bd07595b117a08871ebc0a16452cc798d35b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git of_mdio: make of_mdiobus_register_{device|phy}() *void* The results of of_mdiobus_register_{device|phy}() are never checked, so we can make both these functions *void*... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller --- diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 8453f08d2ef4..2c1e52e06102 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -41,8 +41,8 @@ static int of_get_phy_id(struct device_node *device, u32 *phy_id) return -EINVAL; } -static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *child, - u32 addr) +static void of_mdiobus_register_phy(struct mii_bus *mdio, + struct device_node *child, u32 addr) { struct phy_device *phy; bool is_c45; @@ -57,7 +57,7 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi else phy = get_phy_device(mdio, addr, is_c45); if (IS_ERR_OR_NULL(phy)) - return 1; + return; rc = irq_of_parse_and_map(child, 0); if (rc > 0) { @@ -81,25 +81,22 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi if (rc) { phy_device_free(phy); of_node_put(child); - return 1; + return; } dev_dbg(&mdio->dev, "registered phy %s at address %i\n", child->name, addr); - - return 0; } -static int of_mdiobus_register_device(struct mii_bus *mdio, - struct device_node *child, - u32 addr) +static void of_mdiobus_register_device(struct mii_bus *mdio, + struct device_node *child, u32 addr) { struct mdio_device *mdiodev; int rc; mdiodev = mdio_device_create(mdio, addr); if (IS_ERR(mdiodev)) - return 1; + return; /* Associate the OF node with the device structure so it * can be looked up later. @@ -112,13 +109,11 @@ static int of_mdiobus_register_device(struct mii_bus *mdio, if (rc) { mdio_device_free(mdiodev); of_node_put(child); - return 1; + return; } dev_dbg(&mdio->dev, "registered mdio device %s at address %i\n", child->name, addr); - - return 0; } int of_mdio_parse_addr(struct device *dev, const struct device_node *np)