diff options
author | Thomas Renninger <trenn@suse.de> | 2010-07-29 06:27:59 -0400 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2010-08-03 09:49:12 -0400 |
commit | c4775062d57c762de37ff93fb5f8611320c25e2a (patch) | |
tree | 193ff932df87e6aa20f4dcebb2682d8b8d17be75 /drivers/platform | |
parent | 4519169b8f096957e4474e9a17206b2026dab0b3 (diff) |
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 <trenn@suse.de>
CC: linux-acpi@vger.kernel.or
CC: platform-driver-x86@vger.kernel.org
CC: mjg@redhat.com
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
434 | 434 | ||
435 | obj = (union acpi_object *)response.pointer; | 435 | obj = (union acpi_object *)response.pointer; |
436 | 436 | ||
437 | if (obj || obj->type != ACPI_TYPE_BUFFER) { | 437 | if (!obj) |
438 | return; | ||
439 | if (obj->type != ACPI_TYPE_BUFFER) { | ||
438 | printk(KERN_INFO "hp-wmi: Unknown response received %d\n", | 440 | printk(KERN_INFO "hp-wmi: Unknown response received %d\n", |
439 | obj->type); | 441 | obj->type); |
440 | kfree(obj); | 442 | kfree(obj); |