]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
asus-wmi: potential NULL dereference in show_call()
authorDan Carpenter <error27@gmail.com>
Tue, 15 Mar 2011 07:07:37 +0000 (10:07 +0300)
committerMatthew Garrett <mjg@redhat.com>
Mon, 28 Mar 2011 10:46:07 +0000 (06:46 -0400)
In the earlier check we assumed that "obj" could be NULL.  I looked at
some of the other places that call evaluate_object() and they check
for NULL as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/asus-wmi.c

index a038595200ee461581558e2149f85a7020917c46..efc776cb0c664e0c8bf19c092c0a48367d4e1043 100644 (file)
@@ -1343,7 +1343,7 @@ static int show_call(struct seq_file *m, void *data)
        else
                seq_printf(m, "%#x(%#x, %#x) = t:%d\n", asus->debug.method_id,
                           asus->debug.dev_id, asus->debug.ctrl_param,
-                          obj->type);
+                          obj ? obj->type : -1);
 
        kfree(obj);