]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: iproc: Propagate errors for optional PHYs
authorThierry Reding <treding@nvidia.com>
Thu, 29 Aug 2019 10:53:19 +0000 (12:53 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 4 Sep 2019 14:44:05 +0000 (15:44 +0100)
commitf735ef3e57773041b31938656ab1bd33edeb3a24
treec7e145556d585c25fd9b5e5b454187e81002b09f
parentd4f68bcd058f500ff5c35e1ef5021b74a90ff5a3
PCI: iproc: Propagate errors for optional PHYs

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: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
drivers/pci/controller/pcie-iproc-platform.c