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: e50dfac81f ("ALSA: firewire-motu: cache event ticks in source packet header per data block")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210603143203.582017-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Yang Yingliang 2021-06-03 22:32:03 +08:00 committed by Takashi Iwai
parent 9ce650a75a
commit ce9f50e7ac
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate,
if (!motu->cache.event_offsets) {
fw_iso_resources_free(&motu->tx_resources);
fw_iso_resources_free(&motu->rx_resources);
return err;
return -ENOMEM;
}
}