浏览代码

IB/qib: Fix uninitialized pointer if CONFIG_PCI_MSI not set

If CONFIG_PCI_MSI is not set, and a QLE7140 is present, the pointer
"dd" is uninitialized.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Ralph Campbell 14 年之前
父节点
当前提交
9e43e0106d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/infiniband/hw/qib/qib_init.c

+ 1 - 0
drivers/infiniband/hw/qib/qib_init.c

@@ -1243,6 +1243,7 @@ static int __devinit qib_init_one(struct pci_dev *pdev,
 		qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot "
 		qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot "
 		      "work if CONFIG_PCI_MSI is not enabled\n",
 		      "work if CONFIG_PCI_MSI is not enabled\n",
 		      ent->device);
 		      ent->device);
+		dd = ERR_PTR(-ENODEV);
 #endif
 #endif
 		break;
 		break;