media: atomisp: atomisp_gmin_platform: check before use
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Sep 2020 15:40:52 +0000 (17:40 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 3 Sep 2020 09:20:53 +0000 (11:20 +0200)
commit815ac8567ef9fb56c679da7482bb3266760d69c6
treea0048f0ea06dc7928e1b4004e3e8726f69dce661
parentb2999af93d6202945b92f970951d3fb371247ce9
media: atomisp: atomisp_gmin_platform: check before use

solve this smatch warning:
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:842 gmin_v1p8_ctrl() warn: variable dereferenced before check 'gs' (see line 832)

By moving the check to happen before its usage.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c