PCI: rcar: Clean up PHY init on failure
authorMarek Vasut <marek.vasut@gmail.com>
Fri, 29 Jun 2018 18:48:15 +0000 (13:48 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 29 Jun 2018 18:48:54 +0000 (13:48 -0500)
commit3c5777c372b6eb2e17802b3dc4bd5ebea45d9bcc
tree9ba3e19efe558cfbabe5b4fbdcaf92a2b2fadf62
parent4050360f964694a3ac0c83badd1a441207c86889
PCI: rcar: Clean up PHY init on failure

If the Gen3 PHY fails to power up, the code does not undo the
initialization caused by phy_init(). Add the missing failure
handling to the rcar_pcie_phy_init_gen3() function.

Fixes: 517ca93a7159 ("PCI: rcar: Add R-Car gen3 PHY support")
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
drivers/pci/controller/pcie-rcar.c