summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1998-12-16 00:38:57 +0000
committereivind <eivind@FreeBSD.org>1998-12-16 00:38:57 +0000
commit0a8613d749b3b222a11a4cc29524affa09ec68b2 (patch)
tree1cff2d4cedd193261ba4fa22d581cbd7d321c5e4
parentf1509aea9496162d4bf1269f7a00e0bbb2119c78 (diff)
downloadFreeBSD-src-0a8613d749b3b222a11a4cc29524affa09ec68b2.zip
FreeBSD-src-0a8613d749b3b222a11a4cc29524affa09ec68b2.tar.gz
vxalloc() can return NULL. Deal with it.
-rw-r--r--sys/dev/vx/if_vx_pci.c4
-rw-r--r--sys/pci/if_vx_pci.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c
index 8eb3d75..ab02693 100644
--- a/sys/dev/vx/if_vx_pci.c
+++ b/sys/dev/vx/if_vx_pci.c
@@ -96,7 +96,9 @@ vx_pci_attach(
return;
}
- sc = vxalloc(unit);
+ if ((sc = vxalloc(unit)) == NULL) {
+ return;
+ }
sc->vx_io_addr = pci_conf_read(config_id, 0x10) & 0xffffffe0;
diff --git a/sys/pci/if_vx_pci.c b/sys/pci/if_vx_pci.c
index 8eb3d75..ab02693 100644
--- a/sys/pci/if_vx_pci.c
+++ b/sys/pci/if_vx_pci.c
@@ -96,7 +96,9 @@ vx_pci_attach(
return;
}
- sc = vxalloc(unit);
+ if ((sc = vxalloc(unit)) == NULL) {
+ return;
+ }
sc->vx_io_addr = pci_conf_read(config_id, 0x10) & 0xffffffe0;
OpenPOWER on IntegriCloud