Skip to contentSkip to conversation

drm/pci: add missing variable initialization

PATCH RESEND New Jingoo Han 1 participant 1 message Nov 29, 2012

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH RESEND v2 1/1 drm/pci: add missing variable initialization

Fixed build warning as below:

drivers/gpu/drm/drm_pci.c: In function 'drm_pcie_get_speed_cap_mask':
drivers/gpu/drm/drm_pci.c:496:9: warning: 'lnkcap' may be used uninitialized in this function [-Wuninitialized] drivers/gpu/drm/drm_pci.c:497:10: warning: 'lnkcap2' may be used uninitialized in this function [-Wuninitialized]

---
 drivers/gpu/drm/drm_pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/drm_pci.c +1 -1
index ba33144..754bc96 100644
@@ -470,7 +470,7 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask)
 {
 	struct pci_dev *root;
 	int pos;
-	u32 lnkcap, lnkcap2;
+	u32 lnkcap = 0, lnkcap2 = 0;
 
 	*mask = 0;
 	if (!dev->pdev)
Signature · 1 line
1.7.2.5