raphael: tfa98xx: 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:
dereference23
2025-07-19 20:56:53 +03:00
committed by Joey
parent 272c106d68
commit 95d22e6bf2

View File

@@ -96,7 +96,7 @@ static int amp_set_feedback(amplifier_device_t* device, void* adev, uint32_t snd
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 disable;