Skip to contentSkip to conversation

tlan: avoid unused label with PCI=n

PATCH Applied Arnd Bergmann 2 participants 2 messages Oct 10, 2016 – Oct 13, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tlan: avoid unused label with PCI=n

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.

---
 drivers/net/ethernet/ti/tlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/tlan.c +1 -1
index ece0ea0f6b38..6c7ec1ddd475 100644
@@ -610,8 +610,8 @@ static int tlan_probe1(struct pci_dev *pdev, long ioaddr, int irq, int rev,
 #ifdef CONFIG_PCI
 	if (pdev)
 		pci_release_regions(pdev);
-#endif
 err_out:
+#endif
 	if (pdev)
 		pci_disable_device(pdev);
 	return rc;
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw

From: Arnd Bergmann <[email protected]>
Date: Mon, 10 Oct 2016 14:41:10 +0200

Quoted 10 lines

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.

Applied, thanks Arnd.