From c4775062d57c762de37ff93fb5f8611320c25e2a Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Thu, 29 Jul 2010 12:27:59 +0200 Subject: [PATCH] hp-wmi: Fix mixing up of and/or directive This should have been an "and". Additionally checking for !obj is even better. Signed-off-by: Thomas Renninger CC: linux-acpi@vger.kernel.or CC: platform-driver-x86@vger.kernel.org CC: mjg@redhat.com Signed-off-by: Matthew Garrett --- drivers/platform/x86/hp-wmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index c5f95d1e0315..7e8a136b025b 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -434,7 +434,9 @@ static void hp_wmi_notify(u32 value, void *context) obj = (union acpi_object *)response.pointer; - if (obj || obj->type != ACPI_TYPE_BUFFER) { + if (!obj) + return; + if (obj->type != ACPI_TYPE_BUFFER) { printk(KERN_INFO "hp-wmi: Unknown response received %d\n", obj->type); kfree(obj); -- 2.20.1