浏览代码

[sis190] Avoid NULL pointer dereference

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年前
父节点
当前提交
3870a7bde2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/drivers/net/sis190.c

+ 1
- 1
src/drivers/net/sis190.c 查看文件

@@ -965,8 +965,8 @@ static int sis190_get_mac_addr_from_apc(struct pci_device *pdev,
965 965
 
966 966
 	list_for_each_entry(d, &(pdev->dev.siblings), siblings) {
967 967
 		unsigned int i;
968
-		isa_bridge = container_of(d, struct pci_device, dev);
969 968
 		for(i = 0; i < sis190_isa_bridge_driver.id_count; i++) {
969
+			isa_bridge = container_of(d, struct pci_device, dev);
970 970
 			if(isa_bridge->vendor ==
971 971
 			     sis190_isa_bridge_driver.ids[i].vendor
972 972
 			     && isa_bridge->device ==

正在加载...
取消
保存