Commit ce9f50e7 authored by Yang Yingliang's avatar Yang Yingliang Committed by Takashi Iwai

ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: e50dfac8 ("ALSA: firewire-motu: cache event ticks in source packet header per data block")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Acked-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210603143203.582017-1-yangyingliang@huawei.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9ce650a7
...@@ -191,7 +191,7 @@ int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate, ...@@ -191,7 +191,7 @@ int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate,
if (!motu->cache.event_offsets) { if (!motu->cache.event_offsets) {
fw_iso_resources_free(&motu->tx_resources); fw_iso_resources_free(&motu->tx_resources);
fw_iso_resources_free(&motu->rx_resources); fw_iso_resources_free(&motu->rx_resources);
return err; return -ENOMEM;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment