Skip to content

Commit

Permalink
hp-wmi: Fix mixing up of and/or directive
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Renninger authored and Matthew Garrett committed Aug 3, 2010
1 parent 4519169 commit c477506
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c477506

Please sign in to comment.