asus-wmi: potential NULL dereference in show_call()

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>
This commit is contained in:
Dan Carpenter 2011-03-15 10:07:37 +03:00 committed by Matthew Garrett
parent 0986f25fbb
commit a1d6086739

View file

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