From: Jingoo Han Date: Thu, 29 Nov 2012 04:26:05 +0000 (+0900) Subject: drm/pci: add missing variable initialization X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ca062415338b62a3688528d4a298db733ad27003;p=linux-beck.git 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] Signed-off-by: Jingoo Han Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index ba33144257e5..754bc96e10c7 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -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)