Skip to contentSkip to conversation

media: ccs: Avoid deadlock in ccs_init_state()

PATCH New Sakari Ailus 1 participant 1 message Mar 22

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 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.

Fixes ea3674c4465c ("media: ccs: Switch to guard and scoped_guard")
---
 drivers/media/i2c/ccs/ccs-core.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/i2c/ccs/ccs-core.c +0 -2
index aa4dd7e7cf5a..8e25f970fd12 100644
@@ -3080,8 +3080,6 @@ static int ccs_init_state(struct v4l2_subdev *sd,
 	struct v4l2_rect *crop =
 		v4l2_subdev_state_get_crop(sd_state, pad);
 
-	guard(mutex)(&sensor->mutex);
-
 	ccs_get_native_size(ssd, crop);
 
 	fmt->width = crop->width;
Signature · 1 line
2.47.3