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>
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);