Skip to content

Commit 0bb2be2

Browse files
jwrdegoedebroonie
authored andcommitted
ASoC: Intel: atom: Check drv->lock is locked in sst_fill_and_send_cmd_unlocked
sst_fill_and_send_cmd_unlocked must be called with the drv->lock mutex locked already. In the past there have been cases where this was not the case, add a WARN_ON to check for drv->lock being locked. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 81630dc commit 0bb2be2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/intel/atom/sst-atom-controls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ static int sst_fill_and_send_cmd_unlocked(struct sst_data *drv,
5050
{
5151
int ret = 0;
5252

53+
WARN_ON(!mutex_is_locked(&drv->lock));
54+
5355
ret = sst_fill_byte_control(drv, ipc_msg,
5456
block, task_id, pipe_id, len, cmd_data);
5557
if (ret < 0)

0 commit comments

Comments
 (0)