|
@@ -118,7 +118,7 @@ int generic_phy_init(struct phy *phy)
|
|
|
{
|
|
|
struct phy_ops const *ops;
|
|
|
|
|
|
- if (!phy)
|
|
|
+ if (!generic_phy_valid(phy))
|
|
|
return 0;
|
|
|
ops = phy_dev_ops(phy->dev);
|
|
|
|
|
@@ -129,7 +129,7 @@ int generic_phy_reset(struct phy *phy)
|
|
|
{
|
|
|
struct phy_ops const *ops;
|
|
|
|
|
|
- if (!phy)
|
|
|
+ if (!generic_phy_valid(phy))
|
|
|
return 0;
|
|
|
ops = phy_dev_ops(phy->dev);
|
|
|
|
|
@@ -140,7 +140,7 @@ int generic_phy_exit(struct phy *phy)
|
|
|
{
|
|
|
struct phy_ops const *ops;
|
|
|
|
|
|
- if (!phy)
|
|
|
+ if (!generic_phy_valid(phy))
|
|
|
return 0;
|
|
|
ops = phy_dev_ops(phy->dev);
|
|
|
|
|
@@ -151,7 +151,7 @@ int generic_phy_power_on(struct phy *phy)
|
|
|
{
|
|
|
struct phy_ops const *ops;
|
|
|
|
|
|
- if (!phy)
|
|
|
+ if (!generic_phy_valid(phy))
|
|
|
return 0;
|
|
|
ops = phy_dev_ops(phy->dev);
|
|
|
|
|
@@ -162,7 +162,7 @@ int generic_phy_power_off(struct phy *phy)
|
|
|
{
|
|
|
struct phy_ops const *ops;
|
|
|
|
|
|
- if (!phy)
|
|
|
+ if (!generic_phy_valid(phy))
|
|
|
return 0;
|
|
|
ops = phy_dev_ops(phy->dev);
|
|
|
|