mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
ASoC: qdsp6: q6asm-dai: Fix a NULL vs IS_ERR() bug
The q6asm_audio_client_alloc() doesn't return NULL, it returns error
pointers.
Fixes: 22930c79ac
("ASoC: qdsp6: q6asm-dai: Add support to compress offload")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
eef08e5350
commit
3391034e18
@ -570,10 +570,11 @@ static int q6asm_dai_compr_open(struct snd_compr_stream *stream)
|
||||
prtd->audio_client = q6asm_audio_client_alloc(dev,
|
||||
(q6asm_cb)compress_event_handler,
|
||||
prtd, stream_id, LEGACY_PCM_MODE);
|
||||
if (!prtd->audio_client) {
|
||||
if (IS_ERR(prtd->audio_client)) {
|
||||
dev_err(dev, "Could not allocate memory\n");
|
||||
ret = PTR_ERR(prtd->audio_client);
|
||||
kfree(prtd);
|
||||
return -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
size = COMPR_PLAYBACK_MAX_FRAGMENT_SIZE *
|
||||
|
Loading…
Reference in New Issue
Block a user