mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
ALSA: firewire-motu: fix unreleased lock warning in hwdep device
Smatch static analysis tool detects that acquired lock is not released
in hwdep device when condition branch is passed due to no event. It is
unlikely to occur, while fulfilling is preferable for better coding.
Reported-by: Dan Carpenter <error27@gmail.com>
Fixes: 634ec0b290
("ALSA: firewire-motu: notify event for parameter change in register DSP model")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230130141540.102854-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
4f876bfdb7
commit
c7a806d9ce
@ -87,6 +87,10 @@ static long hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count,
|
||||
return -EFAULT;
|
||||
|
||||
count = consumed;
|
||||
} else {
|
||||
spin_unlock_irq(&motu->lock);
|
||||
|
||||
count = 0;
|
||||
}
|
||||
|
||||
return count;
|
||||
|
Loading…
Reference in New Issue
Block a user