summaryrefslogtreecommitdiff
path: root/drivers/of/of_mdio.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2016-03-13 00:33:13 +0300
committerDavid S. Miller <davem@davemloft.net>2016-03-14 22:31:58 +0300
commita3478bae7a2751500386816ca567af4fc0f5eb10 (patch)
tree97bffa8d2d237bc22e4a2fd336efeea60d8b098d /drivers/of/of_mdio.c
parent1f3a1c546615a2022c461c5e3458dd8a8f2f3aa1 (diff)
downloadlinux-a3478bae7a2751500386816ca567af4fc0f5eb10.tar.xz
of_mdio: mdio_device_create() never returns NULL
mdio_device_create() never returns NULL, thus checking for it in of_mdiobus_register_device() is pointless... Suggested-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r--drivers/of/of_mdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 5e7838290998..3bc68acac64c 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -98,7 +98,7 @@ static int of_mdiobus_register_device(struct mii_bus *mdio,
int rc;
mdiodev = mdio_device_create(mdio, addr);
- if (!mdiodev || IS_ERR(mdiodev))
+ if (IS_ERR(mdiodev))
return 1;
/* Associate the OF node with the device structure so it