Skip to contentSkip to conversation

of_mdio: use IS_ERR_OR_NULL() in of_mdiobus_register_phy()

PATCH In review Sergei Shtylyov 1 participant 2 messages Mar 11, 2016 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of_mdio: use IS_ERR_OR_NULL() in of_mdiobus_register_phy()

IS_ERR_OR_NULL() is basically open coded in of_mdiobus_register_phy(), so just call it directly...

---
The patch is against DaveM's 'net-next.git' repo.

 drivers/of/of_mdio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/of_mdio.c +1 -1
Index: net-next/drivers/of/of_mdio.c
===================================================================
@@ -56,7 +56,7 @@ static int of_mdiobus_register_phy(struc
 		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);

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 11763266.4LDe0Junmu-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org

#2 lore raw
Quoted 2 lines · Sergei Shtylyov

IS_ERR_OR_NULL() is basically open coded in of_mdiobus_register_phy(), so just call it directly...

I found one more place where this change is needed, will recast.

Quoted 1 line

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html