summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2017-03-22 15:12:56 +0100
committerMichael Brown2017-03-22 15:12:56 +0100
commit3870a7bde2aea95f2ec8e730b853166eb469f2c2 (patch)
tree6ffaf6293d70e8d0c4e1d3df865136bbf8423c29 /src/drivers
parent[w89c840] Avoid potential array overrun (diff)
downloadipxe-3870a7bde2aea95f2ec8e730b853166eb469f2c2.tar.gz
ipxe-3870a7bde2aea95f2ec8e730b853166eb469f2c2.tar.xz
ipxe-3870a7bde2aea95f2ec8e730b853166eb469f2c2.zip
[sis190] Avoid NULL pointer dereference
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/net/sis190.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/net/sis190.c b/src/drivers/net/sis190.c
index 81f3d984..b92e95f2 100644
--- a/src/drivers/net/sis190.c
+++ b/src/drivers/net/sis190.c
@@ -965,8 +965,8 @@ static int sis190_get_mac_addr_from_apc(struct pci_device *pdev,
list_for_each_entry(d, &(pdev->dev.siblings), siblings) {
unsigned int i;
- isa_bridge = container_of(d, struct pci_device, dev);
for(i = 0; i < sis190_isa_bridge_driver.id_count; i++) {
+ isa_bridge = container_of(d, struct pci_device, dev);
if(isa_bridge->vendor ==
sis190_isa_bridge_driver.ids[i].vendor
&& isa_bridge->device ==