diff options
Diffstat (limited to 'sound/soc/sof/ops.h')
| -rw-r--r-- | sound/soc/sof/ops.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index d73644e85b6e..72af1f4ff620 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -287,16 +287,12 @@ static inline int snd_sof_dsp_set_power_state(struct snd_sof_dev *sdev, const struct sof_dsp_power_state *target_state) { - int ret = 0; - - mutex_lock(&sdev->power_state_access); + guard(mutex)(&sdev->power_state_access); if (sof_ops(sdev)->set_power_state) - ret = sof_ops(sdev)->set_power_state(sdev, target_state); - - mutex_unlock(&sdev->power_state_access); + return sof_ops(sdev)->set_power_state(sdev, target_state); - return ret; + return 0; } /* debug */ |
