]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
PCI: exynos: Propagate errors for optional PHYs
authorThierry Reding <treding@nvidia.com>
Thu, 29 Aug 2019 10:53:15 +0000 (12:53 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:43 +0000 (11:55 +0200)
commitb9603ea948a1075dc0e836a5c63bbee1cb477655
treeae2fa399df9ef4bec855a509d5180b6f8099072d
parent338db7317035fc1200dc7e9010346b95d1dba6da
PCI: exynos: Propagate errors for optional PHYs

BugLink: https://bugs.launchpad.net/bugs/1848274
[ Upstream commit ddd6960087d4b45759434146d681a94bbb1c54ad ]

devm_of_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_of_phy_get() 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: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/pci/dwc/pci-exynos.c