From 0b7527a463a9f494e15e067ff7bbc604f24fac3a Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Tue, 20 Nov 2018 18:29:01 +1100 Subject: 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 --- pcm.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- cgit 1.2.3-korg