• Thierry Reding's avatar
    PCI: iproc: Propagate errors for optional PHYs · c1e33666
    Thierry Reding authored
    devm_phy_get() 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_phy_optional_get() is a function that exactly
    does what's required here, so use that instead.
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Reviewed-by: default avatarAndrew Murray <andrew.murray@arm.com>
    Cc: Ray Jui <rjui@broadcom.com>
    Cc: Scott Branden <sbranden@broadcom.com>
    Cc: bcm-kernel-feedback-list@broadcom.com
    c1e33666
pcie-iproc-platform.c 3.75 KB