]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: fix bad usage at error handling logic
authorMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 14 Mar 2022 17:11:38 +0000 (18:11 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 18 Mar 2022 04:58:35 +0000 (05:58 +0100)
commitef32a180ba15427145c5781eb98af3aedefd0106
tree4a6d5b6ebf622cd8bc9c53c38ec4c3550ecce9e6
parenta99bf1e7083c53db5d10a5dd349dd0fc791adf71
media: atomisp: fix bad usage at error handling logic

As warned by sparse:
atomisp: drivers/staging/media/atomisp/pci/atomisp_acc.c:508 atomisp_acc_load_extensions() warn: iterator used outside loop: 'acc_fw'

The acc_fw interactor is used outside the loop, at the error handling
logic. On most cases, this is actually safe there, but, if
atomisp_css_set_acc_parameters() has an error, an attempt to use it
will pick an invalid value for acc_fw.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_acc.c