提交 ca062415 编写于 作者: J Jingoo Han 提交者: Dave Airlie

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: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 a8f559ef
...@@ -470,7 +470,7 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) ...@@ -470,7 +470,7 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask)
{ {
struct pci_dev *root; struct pci_dev *root;
int pos; int pos;
u32 lnkcap, lnkcap2; u32 lnkcap = 0, lnkcap2 = 0;
*mask = 0; *mask = 0;
if (!dev->pdev) if (!dev->pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册