ALSA: firewire-tascam: Add missing annotation for tscm_hwdep_read_locked()
authorJules Irenge <jbi.octave@gmail.com>
Wed, 11 Mar 2020 01:09:08 +0000 (01:09 +0000)
committerTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 06:55:38 +0000 (07:55 +0100)
Sparse reports a warning at tscm_hwdep_read_locked()

warning: context imbalance in tscm_hwdep_read_locked() - unexpected unlock

The root cause is the missing annotation at tscm_hwdep_read_locked()
Add the missing __releases(&tscm->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200311010908.42366-9-jbi.octave@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/tascam/tascam-hwdep.c

index 9801e33..6f38335 100644 (file)
@@ -17,6 +17,7 @@
 
 static long tscm_hwdep_read_locked(struct snd_tscm *tscm, char __user *buf,
                                   long count, loff_t *offset)
+       __releases(&tscm->lock)
 {
        struct snd_firewire_event_lock_status event = {
                .type = SNDRV_FIREWIRE_EVENT_LOCK_STATUS,