]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: intel_menlow: avoid null pointer deference error
authorYoung Xiao <92siuyang@gmail.com>
Wed, 29 May 2019 01:55:51 +0000 (09:55 +0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 12 Jun 2019 09:42:27 +0000 (12:42 +0300)
commita8a81e76812cebf7924a72d93acb31d30c21cdd4
tree4b25dc231b59b718bf7f677ab688befc982fc3f5
parenta8e0ff9c58ac631f9b0843d608e1db17536e2d24
platform/x86: intel_menlow: avoid null pointer deference error

Fix a null pointer deference by acpi_driver_data() if device is
null (dereference before check). We should only set cdev and check
this is OK after we are sure device is not null.

Signed-off-by: Young Xiao <92siuyang@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_menlow.c