aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorChunhe Lan <Chunhe.Lan@freescale.com>2012-03-07 02:16:26 -0500
committerBjorn Helgaas <bhelgaas@google.com>2012-05-07 11:27:26 -0400
commit1267b3a325f00291e847ea4a001ccabe5d5516f2 (patch)
treec7a9ceaf50653d87278362a05389b91ab74fca1d /drivers/pci/pcie
parent0cbaa57d828aa0a067e06d3c6d795b12ae9fb776 (diff)
PCI: fix uninitialized variable 'cap_mask'
Get rid of these: drivers/pci/pcie/portdrv_core.c: In function 'pcie_port_device_register': drivers/pci/pcie/portdrv_core.c:275:16: warning: 'cap_mask' may be used uninitialized in this function [-Wuninitialized] drivers/pci/pcie/portdrv_core.c:240:6: note: 'cap_mask' was declared here In some cases, 'cap_mask' may be not set in pcie_port_platform_notify, holding a garbage value. Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/portdrv_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 2f589a54f9bd..75915b30ad19 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -249,7 +249,7 @@ static int get_port_device_capability(struct pci_dev *dev)
249 int services = 0, pos; 249 int services = 0, pos;
250 u16 reg16; 250 u16 reg16;
251 u32 reg32; 251 u32 reg32;
252 int cap_mask; 252 int cap_mask = 0;
253 int err; 253 int err;
254 254
255 if (pcie_ports_disabled) 255 if (pcie_ports_disabled)