]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: simplify asd check on open() fops
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 10 Nov 2021 13:08:28 +0000 (13:08 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:59 +0000 (08:11 +0000)
commit86811761847e88768e0b63cf3d7cdca8ee56e450
tree4c05b923a156dd2a1ccc62b6d8c5b477735a425e
parentd6345cdb34e5101681b33cc5aaef8f4bb16ce7a9
media: atomisp: simplify asd check on open() fops

The open() fops support two types of devices: "acc" and normal
ones. the acc works on a different way, using a different pipe
struct. Not sure yet if it would make sense to setup a run_mode
there. Also, As default_run_mode exists only on normal modes,
we can simplify the logic to check if the device is in normal
mode.

That solves this warning:

../drivers/staging/media/atomisp/pci/atomisp_fops.c:904 atomisp_open() warn: variable dereferenced before check 'asd' (see line 807)

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