]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
acer-wmi: fix obj is NULL but dereferenced
authorLee, Chun-Yi <joeyli.kernel@gmail.com>
Fri, 14 Dec 2012 08:14:26 +0000 (16:14 +0800)
committerMatthew Garrett <matthew.garrett@nebula.com>
Mon, 7 Jan 2013 17:31:30 +0000 (12:31 -0500)
commitf20aaba9819d0801fb1314363f97239da0100bac
tree5b6bff7041a69808997cb2857ddce701a24f9d77
parent182ae55c1285080086cf4ef969ad09d84e00237f
acer-wmi: fix obj is NULL but dereferenced

Fengguang Wu run coccinelle and warns about:
  drivers/platform/x86/acer-wmi.c:1200:17-21: ERROR: obj is NULL but dereferenced.
  drivers/platform/x86/acer-wmi.c:891:17-21: ERROR: obj is NULL but dereferenced.
  drivers/platform/x86/acer-wmi.c:1953:17-21: ERROR: obj is NULL but dereferenced.

It causes by the code in patch 987dfbaa65b2c3568b85e29d2598da08a011ee09 doesn't check
obj variable should not be NULL. There have risk for dereference a NULL obj, so add
this patch to fix.

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/acer-wmi.c