Input: hideep - fix the uninitialized use in hideep_nvm_unlock()
authorYizhuo Zhai <yzhai003@ucr.edu>
Sun, 20 Jun 2021 05:26:50 +0000 (22:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:11 +0000 (16:02 +0200)
commita37048c0583e28c1a62e302c8b258ff0356960a3
tree9c996e7a9fc65cf5f6f579a40e4cf66b891404d2
parent2cebf6c92692dcb88b992bdbe7218fa1faa7b2fb
Input: hideep - fix the uninitialized use in hideep_nvm_unlock()

[ Upstream commit cac7100d4c51c04979dacdfe6c9a5e400d3f0a27 ]

Inside function hideep_nvm_unlock(), variable "unmask_code" could
be uninitialized if hideep_pgm_r_reg() returns error, however, it
is used in the later if statement after an "and" operation, which
is potentially unsafe.

Signed-off-by: Yizhuo <yzhai003@ucr.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/touchscreen/hideep.c