summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi_support
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-06-11 18:19:23 +0000
committerjkim <jkim@FreeBSD.org>2010-06-11 18:19:23 +0000
commit2325aa45dbf3b3027cc8b306f15d929e129441ca (patch)
tree8e3d2213135c50b466d5ac429922c1ccdd6086de /sys/dev/acpi_support
parent09830f0c6f6176f6e31316658158ef9f89afb842 (diff)
downloadFreeBSD-src-2325aa45dbf3b3027cc8b306f15d929e129441ca.zip
FreeBSD-src-2325aa45dbf3b3027cc8b306f15d929e129441ca.tar.gz
Fix a possible dereference of null pointer.
Found by: clang static analyzer Found by: Coverity Prevent[tm] (CID 3423)
Diffstat (limited to 'sys/dev/acpi_support')
-rw-r--r--sys/dev/acpi_support/acpi_hp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/acpi_support/acpi_hp.c b/sys/dev/acpi_support/acpi_hp.c
index d3deed3..83e4bf7 100644
--- a/sys/dev/acpi_support/acpi_hp.c
+++ b/sys/dev/acpi_support/acpi_hp.c
@@ -905,7 +905,7 @@ acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance,
return (-EINVAL);
}
obj = out.Pointer;
- if (!obj && obj->Type != ACPI_TYPE_PACKAGE) {
+ if (!obj || obj->Type != ACPI_TYPE_PACKAGE) {
acpi_hp_free_buffer(&out);
return (-EINVAL);
}
OpenPOWER on IntegriCloud