mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
of_mdio: use IS_ERR_OR_NULL()
IS_ERR_OR_NULL() is open coded in of_mdiobus_register_phy(), so just call it directly... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a3478bae7a
commit
ac044b902e
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
|
|||
phy = phy_device_create(mdio, addr, phy_id, 0, NULL);
|
||||
else
|
||||
phy = get_phy_device(mdio, addr, is_c45);
|
||||
if (!phy || IS_ERR(phy))
|
||||
if (IS_ERR_OR_NULL(phy))
|
||||
return 1;
|
||||
|
||||
rc = irq_of_parse_and_map(child, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue