diff options
author | njl <njl@FreeBSD.org> | 2005-05-12 22:35:08 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-05-12 22:35:08 +0000 |
commit | 569f3fdf0dc5ab3c76973022c3437f5e58d415b7 (patch) | |
tree | 06d915ab37b652057a176c7cd8d17f0d0c95e4df /sys/dev/acpica/acpi_ec.c | |
parent | 7dcfa56215b0dbaf69f1c0093904ed4017afa0a1 (diff) | |
download | FreeBSD-src-569f3fdf0dc5ab3c76973022c3437f5e58d415b7.zip FreeBSD-src-569f3fdf0dc5ab3c76973022c3437f5e58d415b7.tar.gz |
If there is a problem during probe, be sure to free up any resources
allocated for it. The normal exit case handles this correctly so we
use it as well for errors.
Submitted by: pjd
Obtained from: Coverity Prevent
Diffstat (limited to 'sys/dev/acpica/acpi_ec.c')
-rw-r--r-- | sys/dev/acpica/acpi_ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 35ea36c..b474a10 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -489,11 +489,11 @@ acpi_ec_probe(device_t dev) if (ACPI_FAILURE(status)) { device_printf(dev, "can't evaluate _GPE - %s\n", AcpiFormatException(status)); - return (ENXIO); + goto out; } obj = (ACPI_OBJECT *)buf.Pointer; if (obj == NULL) - return (ENXIO); + goto out; switch (obj->Type) { case ACPI_TYPE_INTEGER: |