Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ccs: Avoid deadlock in ccs_init_state()

The sub-device state lock has been already acquired when ccs_init_state()
is called. Do not try to acquire it again.

Reported-by: David Heidelberg <david@ixit.cz>
Fixes: a88883d1209c ("media: ccs: Rely on sub-device state locking")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Sakari Ailus and committed by
Hans Verkuil
7587fbf5 7c39f485

-2
-2
drivers/media/i2c/ccs/ccs-core.c
··· 3080 3080 struct v4l2_rect *crop = 3081 3081 v4l2_subdev_state_get_crop(sd_state, pad); 3082 3082 3083 - guard(mutex)(&sensor->mutex); 3084 - 3085 3083 ccs_get_native_size(ssd, crop); 3086 3084 3087 3085 fmt->width = crop->width;