Browse Source

[sis190] Avoid NULL pointer dereference

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
3870a7bde2
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/drivers/net/sis190.c

+ 1
- 1
src/drivers/net/sis190.c View File

@@ -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 ==

Loading…
Cancel
Save