OSDN Git Service

platform/x86: compal-laptop: Initialize "value" in ec_read_u8()
authorYizhuo <yzhai003@ucr.edu>
Mon, 2 Sep 2019 19:52:49 +0000 (12:52 -0700)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 7 Sep 2019 18:16:09 +0000 (21:16 +0300)
commit09e7f2805c352dc38d13f663613663574a0584ad
tree8c1ce94acf0e975a261439fa8110b8b433a1be09
parent37d960a4d753605ca248baea577eaaa96f5dccf0
platform/x86: compal-laptop: Initialize "value" in ec_read_u8()

In function ec_read_u8(), variable "value" could be uninitialized
if ec_read() fails. However, "value" is returned directly and used
in its callers. This is potentially unsafe.

Signed-off-by: Yizhuo <yzhai003@ucr.edu>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/compal-laptop.c