diff mbox series

[05/17] audio: remove sw == NULL check

Message ID 20230115131224.30751-5-volker.ruemelin@t-online.de (mailing list archive)
State New, archived
Headers show
Series [01/17] audio: change type of mix_buf and conv_buf | expand

Commit Message

Volker Rümelin Jan. 15, 2023, 1:12 p.m. UTC
From: Volker Rümelin <vr_qemu@t-online.de>

All call sites of audio_pcm_sw_write() guarantee that sw is not
NULL. Remove the unnecessary NULL check.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
 audio/audio.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/audio/audio.c b/audio/audio.c
index b0a270ba85..9d6ffa500a 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -710,10 +710,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;