qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 04/59] paaudio.c: remove unneeded labels


From: Daniel Henrique Barboza
Subject: [PATCH v1 04/59] paaudio.c: remove unneeded labels
Date: Mon, 6 Jan 2020 15:23:30 -0300

Label 'fail1' in qpa_init_out() and qpa_init_in() can be replaced
by 'return -1'.

CC: Gerd Hoffmann <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
 audio/paaudio.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/audio/paaudio.c b/audio/paaudio.c
index 55a91f8980..8f42b2079c 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -470,7 +470,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings 
*as,
         );
     if (!pa->stream) {
         qpa_logerr (error, "pa_simple_new for playback failed\n");
-        goto fail1;
+        return -1;
     }
 
     audio_pcm_init_info (&hw->info, &obt_as);
@@ -479,9 +479,6 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings 
*as,
         &obt_as, ppdo->buffer_length);
 
     return 0;
-
- fail1:
-    return -1;
 }
 
 static int qpa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque)
@@ -518,7 +515,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings 
*as, void *drv_opaque)
         );
     if (!pa->stream) {
         qpa_logerr (error, "pa_simple_new for capture failed\n");
-        goto fail1;
+        return -1;
     }
 
     audio_pcm_init_info (&hw->info, &obt_as);
@@ -527,9 +524,6 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings 
*as, void *drv_opaque)
         &obt_as, ppdo->buffer_length);
 
     return 0;
-
- fail1:
-    return -1;
 }
 
 static void qpa_simple_disconnect(PAConnection *c, pa_stream *stream)
-- 
2.24.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]