]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
powerpc/4xx: Don't unmap NULL mbase
authorhuhai <huhai@tj.kylinos.cn>
Thu, 21 May 2020 07:26:48 +0000 (17:26 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jun 2020 13:41:55 +0000 (15:41 +0200)
[ Upstream commit bcec081ecc940fc38730b29c743bbee661164161 ]

Signed-off-by: huhai <huhai@tj.kylinos.cn>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200521072648.1254699-1-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/4xx/pci.c

index 73e6b36bcd5125724a0c913d745e1a4bab9b1133..256943af58aaeeca75c6b4d1a4b61d4b721c6c46 100644 (file)
@@ -1242,7 +1242,7 @@ static void __init ppc460sx_pciex_check_link(struct ppc4xx_pciex_port *port)
        if (mbase == NULL) {
                printk(KERN_ERR "%pOF: Can't map internal config space !",
                        port->node);
-               goto done;
+               return;
        }
 
        while (attempt && (0 == (in_le32(mbase + PECFG_460SX_DLLSTA)
@@ -1252,9 +1252,7 @@ static void __init ppc460sx_pciex_check_link(struct ppc4xx_pciex_port *port)
        }
        if (attempt)
                port->link = 1;
-done:
        iounmap(mbase);
-
 }
 
 static struct ppc4xx_pciex_hwops ppc460sx_pcie_hwops __initdata = {