[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
- Re: [PATCH v1 06/59] mips-semi.c: remove 'uhi_done' label in helper_do_semihosting(), (continued)
- [PATCH v1 17/59] block/dmg.c: remove unneeded 'fail' label in dmg_read_mish_block(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 19/59] block/ssh.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 03/59] kvm-all.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 01/59] spapr.c: remove 'out' label in spapr_dt_cas_updates(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 02/59] ppc440_bamboo.c: remove label from bamboo_load_device_tree(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 04/59] paaudio.c: remove unneeded labels,
Daniel Henrique Barboza <=
- [PATCH v1 07/59] unicore32/softmmu.c: remove 'do_fault' label in get_phys_addr_ucv2(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 08/59] chardev/char-mux.c: remove 'send_char' label, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 10/59] chardev/char-win.c: remove 'fail' label in win_chr_serial_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 11/59] exec.c: remove 'err' label in ram_block_discard_range(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 12/59] virtfs-proxy-helper.c: remove 'err_out' label in setugid(), Daniel Henrique Barboza, 2020/01/06