This should have been an "and". Additionally checking for !obj
is even better.

Signed-off-by: Thomas Renninger <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
---
 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 4c30dd3..f324c55 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -470,7 +470,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);
-- 
1.6.3

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to