OSDN Git Service

tlan: avoid unused label with PCI=n
authorArnd Bergmann <arnd@arndb.de>
Mon, 10 Oct 2016 12:41:10 +0000 (14:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:03:47 +0000 (11:03 +0100)
commit 1e09c106a44c2b2685a77a1ef27951381c9fcd23 upstream.

While build testing with randconfig on x86, I ran into this warning
that appears to have been around forever

drivers/net/ethernet/ti/tlan.c: In function ‘tlan_probe1’:
drivers/net/ethernet/ti/tlan.c:614:1: error: label ‘err_out’ defined but not used [-Werror=unused-label]

This can be trivially avoided by just moving the label into the
existing #ifdef.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ti/tlan.c

index a274cd4..399a89f 100644 (file)
@@ -610,8 +610,8 @@ err_out_regions:
 #ifdef CONFIG_PCI
        if (pdev)
                pci_release_regions(pdev);
-#endif
 err_out:
+#endif
        if (pdev)
                pci_disable_device(pdev);
        return rc;