media: ov9734: hold lock to check streaming state
authorBingbu Cao <bingbu.cao@intel.com>
Fri, 27 Nov 2020 03:48:12 +0000 (04:48 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Dec 2020 14:56:10 +0000 (15:56 +0100)
commit9677958d1d3d21923ca26cb5e989edc18ecf2786
tree424736ceb2ecf98989258c5f895e2d332b55c8d7
parent989bea48915861171421bd6e1367bf4c9407513d
media: ov9734: hold lock to check streaming state

The lock in ov9734 is used to protect the streaming state and
serialize the stream on and off callbacks, it should be hold before
checking the streaming state in ov9734_set_stream().

Reported-by: Tomasz Figa <tfiga@chromium.org>
Reported-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov9734.c