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

Loading…
Cancel
Save