From: Volker Rümelin Date: Fri, 24 Feb 2023 19:05:45 +0000 (+0100) Subject: audio: remove sw == NULL check X-Git-Tag: v8.0.0-rc0~26^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8fc5638788d2f1200e0db2c1575e37be5e474f9;p=thirdparty%2Fqemu.git 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 Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin Message-Id: <20230224190555.7409-5-vr_qemu@t-online.de> --- diff --git a/audio/audio.c b/audio/audio.c index 4412b5fad86..8f1c0e77b00 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;