diff --git a/arch/sim/src/sim/posix/sim_alsa.c b/arch/sim/src/sim/posix/sim_alsa.c index 6b088fef6b..c7180948aa 100644 --- a/arch/sim/src/sim/posix/sim_alsa.c +++ b/arch/sim/src/sim/posix/sim_alsa.c @@ -582,18 +582,13 @@ static int sim_audio_stop(struct audio_lowerhalf_s *dev) static int sim_audio_pause(struct audio_lowerhalf_s *dev) { struct sim_audio_s *priv = (struct sim_audio_s *)dev; - int ret; if (!priv->pcm) { return 0; } - ret = snd_pcm_pause(priv->pcm, 0); - if (ret < 0) - { - return ret; - } + snd_pcm_pause(priv->pcm, 0); return 0; } @@ -601,20 +596,15 @@ static int sim_audio_pause(struct audio_lowerhalf_s *dev) static int sim_audio_resume(struct audio_lowerhalf_s *dev) { struct sim_audio_s *priv = (struct sim_audio_s *)dev; - int ret; if (!priv->pcm) { return 0; } - ret = snd_pcm_resume(priv->pcm); - if (ret < 0) - { - return ret; - } + snd_pcm_resume(priv->pcm); - return ret; + return 0; } #endif