You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
phy: core: Check requested PHY status in _of_phy_get()
This is a common checking in various drivers, so move the checking to _of_phy_get(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
committed by
Kishon Vijay Abraham I
parent
5bea496820
commit
33f434d283
@@ -1107,11 +1107,6 @@ static struct phy *miphy28lp_xlate(struct device *dev,
|
||||
struct device_node *phynode = args->np;
|
||||
int ret, index = 0;
|
||||
|
||||
if (!of_device_is_available(phynode)) {
|
||||
dev_warn(dev, "Requested PHY is disabled\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
if (args->args_count != 1) {
|
||||
dev_err(dev, "Invalid number of cells in 'phy' property\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
Reference in New Issue
Block a user