OSDN Git Service

media: staging: atomisp: fix the uninitialized use in gc2235_detect()
authorYizhuo <yzhai003@ucr.edu>
Sun, 11 Jul 2021 20:23:32 +0000 (22:23 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:44 +0000 (10:07 +0200)
commit5ba9c067b5ed1ccfec58acae07c6582f16b9d44b
treec0bee2841ee614d20eadceac399057df304a34b3
parente16f5e39acd6d10cc63ae39bc0a77188ed828f22
media: staging: atomisp: fix the uninitialized use in gc2235_detect()

Inside function gc2235_detect(), variable "low" could be uninitialized
if ov5693_read_reg() returns error, however, it affects the value of
variable "id". The "id" is used in the later if statement, which is
potentially unsafe.

Link: https://lore.kernel.org/linux-media/20210711202334.27959-1-yzhai003@ucr.edu
Signed-off-by: Yizhuo <yzhai003@ucr.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c