aboutsummaryrefslogtreecommitdiff
path: root/audio/audio.c
diff options
context:
space:
mode:
authorVolker Rümelin <vr_qemu@t-online.de>2023-02-24 20:05:45 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-06 10:30:23 +0400
commitb8fc5638788d2f1200e0db2c1575e37be5e474f9 (patch)
tree7a336e10d5f5a42e9f9e5019d1a8d032c23be939 /audio/audio.c
parent8a81abeeb2e17630c366fccbd99ce20eac328819 (diff)
audio: remove sw == NULL check
All call sites of audio_pcm_sw_write() guarantee that sw is not NULL. Remove the unnecessary NULL check. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-5-vr_qemu@t-online.de>
Diffstat (limited to 'audio/audio.c')
-rw-r--r--audio/audio.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 4412b5fad8..8f1c0e77b0 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -712,10 +712,6 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf, size_t size)
size_t hw_free;
size_t ret, total;
- if (!sw) {
- return size;
- }
-
hwsamples = sw->hw->mix_buf.size;
live = sw->total_hw_samples_mixed;