Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdf6f83b authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman
Browse files

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: 07420a02 ("staging: mt7621-pci: use gpio perst instead of builtin behaviour")
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 36e92f61
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}