treewide: remove redundant IS_ERR() before error code check
[linux-2.6-microblaze.git] / drivers / phy / phy-core.c
index 2eb28cc..cd5a6c9 100644 (file)
@@ -712,7 +712,7 @@ struct phy *phy_optional_get(struct device *dev, const char *string)
 {
        struct phy *phy = phy_get(dev, string);
 
-       if (IS_ERR(phy) && (PTR_ERR(phy) == -ENODEV))
+       if (PTR_ERR(phy) == -ENODEV)
                phy = NULL;
 
        return phy;
@@ -766,7 +766,7 @@ struct phy *devm_phy_optional_get(struct device *dev, const char *string)
 {
        struct phy *phy = devm_phy_get(dev, string);
 
-       if (IS_ERR(phy) && (PTR_ERR(phy) == -ENODEV))
+       if (PTR_ERR(phy) == -ENODEV)
                phy = NULL;
 
        return phy;