All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning
@ 2017-06-21 21:52 ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2017-06-21 21:52 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Bjorn Helgaas
  Cc: linux-pci, linux-arm-kernel, Arnd Bergmann, linux-kernel

The last rework returned a variable that the compiler cannot prove
to be initialized:

arch/arm/mach-iop13xx/pci.c: In function 'iop13xx_scan_bus':
arch/arm/mach-iop13xx/pci.c:509:17: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

In the switch statement that sets the return value, this adds
a default returning an error.

Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-iop13xx/pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
index b97879bfb81a..3c51a9bb9b49 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -553,6 +553,8 @@ int iop13xx_scan_bus(int nr, struct pci_host_bridge *bridge)
 		if (!ret)
 			pci_bus_atue = bridge->bus;
 		break;
+	default:
+		ret = -EINVAL;
 	}
 
 	return ret;
-- 
2.9.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-07-02 21:12 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann
2017-06-21 21:52 ` Arnd Bergmann
2017-06-21 21:52 ` Arnd Bergmann
2017-06-21 21:53 ` [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-22  9:38   ` Lorenzo Pieralisi
2017-06-22  9:38     ` Lorenzo Pieralisi
2017-06-22  9:38     ` Lorenzo Pieralisi
2017-06-27 23:11     ` Bjorn Helgaas
2017-06-27 23:11       ` Bjorn Helgaas
2017-06-27 23:11       ` Bjorn Helgaas
2017-07-01 13:54       ` Lorenzo Pieralisi
2017-07-01 13:54         ` Lorenzo Pieralisi
2017-07-02 21:12         ` Bjorn Helgaas
2017-07-02 21:12           ` Bjorn Helgaas
2017-07-02 21:12           ` Bjorn Helgaas
2017-06-21 21:53 ` [PATCH 3/4] PCI: versatile: fix typo Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-27 22:49   ` Bjorn Helgaas
2017-06-27 22:49     ` Bjorn Helgaas
2017-06-27 22:49     ` Bjorn Helgaas
2017-06-21 21:53 ` [PATCH 4/4] PCI: versatile: fix another typo Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-27 22:52   ` Bjorn Helgaas
2017-06-27 22:52     ` Bjorn Helgaas
2017-06-27 22:52     ` Bjorn Helgaas
2017-06-22  8:47 ` [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Lorenzo Pieralisi
2017-06-22  8:47   ` Lorenzo Pieralisi
2017-06-22  8:47   ` Lorenzo Pieralisi
2017-06-27 22:37 ` Bjorn Helgaas
2017-06-27 22:37   ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.