aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2006-04-21 19:35:03 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2006-04-21 19:35:03 +0000
commit1def0ca64d4f9b641fb4c9f25f8f4df9bb1d4847 (patch)
tree031f2f7f031f5cfa3fa046b47c9f79f25abf70da /sys/dev
parent95f16c1e2c97fa321ac6a7122c8e8602e8f01214 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci_pci.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 586379b566def..d156235806d06 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -187,12 +187,20 @@ pcib_attach_common(device_t dev)
{
char *cp;
- cp = getenv("smbios.planar.maker");
- if (cp == NULL || strncmp(cp, "Compal", 6) != 0)
+ if ((cp = getenv("smbios.planar.maker")) == NULL)
break;
- cp = getenv("smbios.planar.product");
- if (cp == NULL || strncmp(cp, "08A0", 4) != 0)
+ if (strncmp(cp, "Compal", 6) != 0) {
+ freeenv(cp);
break;
+ }
+ freeenv(cp);
+ if ((cp = getenv("smbios.planar.product")) == NULL)
+ break;
+ if (strncmp(cp, "08A0", 4) != 0) {
+ freeenv(cp);
+ break;
+ }
+ freeenv(cp);
if (sc->subbus < 0xa) {
pci_write_config(dev, PCIR_SUBBUS_1, 0xa, 1);
sc->subbus = pci_read_config(dev, PCIR_SUBBUS_1, 1);