linux/types.h: fix typo unchar
[oweals/u-boot.git] / include / generic-phy.h
index 3d26249fae0a51ed88a2f6b7aa3fac9bef8f19a5..95caf583413ce303c17662911060b7e7355feba1 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef __GENERIC_PHY_H
 #define __GENERIC_PHY_H
 
+struct ofnode_phandle_args;
 
 /**
  * struct phy - A handle to (allowing control of) a single phy port.
@@ -269,7 +270,7 @@ static inline int generic_phy_get_by_name(struct udevice *user, const char *phy_
  */
 static inline bool generic_phy_valid(struct phy *phy)
 {
-       return phy->dev != NULL;
+       return phy && phy->dev;
 }
 
 #endif /*__GENERIC_PHY_H */