summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-20 18:29:01 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-20 18:29:01 +1100
commit0b7527a463a9f494e15e067ff7bbc604f24fac3a (patch)
treeaad19d3694f8589338eaa4c6f735a45200ed445f
parentd84d13e2e3b6f6d2674fa4793c37eff6736f8577 (diff)
Add missing return on error
If we return an error value from the callee, we need to return from to the caller immediately. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
-rw-r--r--pcm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pcm.c b/pcm.c
index 0c6afa9..a4f7f0e 100644
--- a/pcm.c
+++ b/pcm.c
@@ -160,6 +160,8 @@ static int pcm_hw_free(struct snd_pcm_substream *substream)
err = DO_AUDIOPATH_CB(
(struct snd_avirt_audiopath *)PRIVATE_DATA(substream)->audiopath,
hw_free, substream);
+ if (err < 0)
+ return err;
return snd_pcm_lib_free_vmalloc_buffer(substream);
}