From: Dan Carpenter Date: Tue, 15 Mar 2011 07:07:37 +0000 (+0300) Subject: asus-wmi: potential NULL dereference in show_call() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a1d6086739c5b8f23a48e02e62b0e495321a2122;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index a038595200ee..efc776cb0c66 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -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);