From: Sergei Shtylyov Date: Sun, 23 Jul 2017 18:45:47 +0000 (+0300) Subject: of_mdio: kill useless variable in of_phy_register_fixed_link() X-Git-Tag: v4.14-rc1~130^2~453 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e470e4f787b94ba0a08cd3b49948e823416f5a6d;p=platform%2Fkernel%2Flinux-exynos.git of_mdio: kill useless variable in of_phy_register_fixed_link() of_phy_register_fixed_link() declares the 'err' variable to hold the result of of_property_read_string() but only uses it once after that, while that function can be called directly from the *if* statement... Remove that variable and move/regroup 'link_gpio' and 'len' variables in order to sort the declarations in the reverse Xmas tree order -- to please DaveM. ;-) 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 e0dbd6e..a0d27c0 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -422,13 +422,11 @@ int of_phy_register_fixed_link(struct device_node *np) struct fixed_phy_status status = {}; struct device_node *fixed_link_node; const __be32 *fixed_link_prop; - int link_gpio; - int len, err; struct phy_device *phy; const char *managed; + int link_gpio, len; - err = of_property_read_string(np, "managed", &managed); - if (err == 0) { + if (of_property_read_string(np, "managed", &managed) == 0) { if (strcmp(managed, "in-band-status") == 0) { /* status is zeroed, namely its .link member */ phy = fixed_phy_register(PHY_POLL, &status, -1, np);