aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/mt7621-pci
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2019-06-21 08:15:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-21 16:50:10 +0200
commitcdf6f83b3cca8ba89b6e492c590282395df35470 (patch)
tree830820ebd26f825885d6399267b9e1d0b0159ea0 /drivers/staging/mt7621-pci
parentstaging: mt7621-pci: disable pcie port clock if there is no pcie link (diff)
downloadlinux-dev-cdf6f83b3cca8ba89b6e492c590282395df35470.tar.xz
linux-dev-cdf6f83b3cca8ba89b6e492c590282395df35470.zip
staging: mt7621-pci: add phy exit call if phy_power_on call fails
Add missing call to 'phy_exit' function if the phy_power_on call fails. With this call added the error path is properly handled. Fixes: 07420a02b003 ("staging: mt7621-pci: use gpio perst instead of builtin behaviour") Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt7621-pci')
-rw-r--r--drivers/staging/mt7621-pci/pci-mt7621.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index f6b91b29fb9c..da2e180f8d19 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -436,6 +436,7 @@ static int mt7621_pcie_init_port(struct mt7621_pcie_port *port)
err = phy_power_on(port->phy);
if (err) {
dev_err(dev, "failed to power on port%d phy\n", slot);
+ phy_exit(port->phy);
return err;
}