Skip to content

Commit 485e39e

Browse files
committed
fixup! ASoC: SOF: Use guard()/scoped_guard() for mutex locks where it makes sense
Looks like a jump over to the error handling path can confise the guard system, use scoped_guard() in sof_client_dev_register(). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 28279f0 commit 485e39e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/sof/sof-client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, u32 id,
294294
}
295295

296296
/* add to list of SOF client devices */
297-
guard(mutex)(&sdev->ipc_client_mutex);
298-
list_add(&centry->list, &sdev->ipc_client_list);
297+
scoped_guard(mutex, &sdev->ipc_client_mutex)
298+
list_add(&centry->list, &sdev->ipc_client_list);
299299

300300
return 0;
301301

0 commit comments

Comments
 (0)