]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Sat, 21 Aug 2021 06:34:45 +0000 (08:34 +0200)
commit12b6db7c64033197d40ce6361e9f98097b8b65a8
tree3f9fd69d681a53d43861862182ace98a68b1a2bb
parent66e2fcaadf8e97a4598d284dba9d8787e9ded8bd
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