From: Yang Yingliang Date: Thu, 3 Jun 2021 14:32:03 +0000 (+0800) Subject: ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex() X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ce9f50e7ac807b7651903c44f1b14a4f97725daa;p=uclinux-h8%2Flinux.git 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: e50dfac81f73 ("ALSA: firewire-motu: cache event ticks in source packet header per data block") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210603143203.582017-1-yangyingliang@huawei.com Signed-off-by: Takashi Iwai --- diff --git a/sound/firewire/motu/motu-stream.c b/sound/firewire/motu/motu-stream.c index 43ff5be32b15..9e6ca39ebd7f 100644 --- a/sound/firewire/motu/motu-stream.c +++ b/sound/firewire/motu/motu-stream.c @@ -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; } }