audio_amplifier: Fix PCM device check

It should've been && instead of ||, but pcm_open() always
returns a valid pointer, so we just drop the NULL check.

Change-Id: Ibf1d0b34b02ca5910cd4c1bee4d55a04205e2203
This commit is contained in:
Alexander Winkowski
2024-09-28 07:29:16 +00:00
committed by Michael Bestas
parent 1177faa26d
commit 1166219abe

View File

@@ -108,7 +108,7 @@ int tfa98xx_start_feedback(void* adev, uint32_t snd_device) {
tfa_dev->tfa98xx_out =
pcm_open(tfa_dev->adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_tfa98xx);
if (!(tfa_dev->tfa98xx_out || pcm_is_ready(tfa_dev->tfa98xx_out))) {
if (!pcm_is_ready(tfa_dev->tfa98xx_out)) {
ALOGE("%d: %s", __LINE__, pcm_get_error(tfa_dev->tfa98xx_out));
rc = -EIO;
goto error;