sky2: fix sparse warning
authorstephen hemminger <shemminger@vyatta.com>
Fri, 12 Feb 2010 06:57:58 +0000 (06:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Feb 2010 00:21:00 +0000 (16:21 -0800)
Warning about hidden variable

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sky2.c

index 45299d6634988906ffebdd9a82be81b8a170e319..92f7ba0953ee263b8d6fd57ba92826b00523e7f0 100644 (file)
@@ -3128,7 +3128,7 @@ static void sky2_reset(struct sky2_hw *hw)
                /* check if PSMv2 was running before */
                reg = sky2_pci_read16(hw, PSM_CONFIG_REG3);
                if (reg & PCI_EXP_LNKCTL_ASPMC) {
-                       int cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
+                       cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
                        /* restore the PCIe Link Control register */
                        sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg);
                }