• T
    PCI: armada8x: Propagate errors for optional PHYs · e7a877b2
    Thierry Reding 提交于
    devm_of_phy_get_by_index() can fail for a number of reasons besides
    probe deferral. It can for example return -ENOMEM if it runs out of
    memory as it tries to allocate devres structures. Propagating only
    -EPROBE_DEFER is problematic because it results in these legitimately
    fatal errors being treated as "PHY not specified in DT".
    
    What we really want is to ignore the optional PHYs only if they have not
    been specified in DT. devm_of_phy_get_by_index() returns -ENODEV in this
    case, so that's the special case that we need to handle. So we propagate
    all errors, except -ENODEV, so that real failures will still cause the
    driver to fail probe.
    Signed-off-by: NThierry Reding <treding@nvidia.com>
    Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Reviewed-by: NAndrew Murray <andrew.murray@arm.com>
    Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
    e7a877b2
pcie-armada8k.c 9.0 KB