ASoC: pxa: fix null-pointer dereference in filter()
authorZeng Heng <zengheng4@huawei.com>
Mon, 14 Nov 2022 08:56:29 +0000 (16:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:09 +0000 (13:14 +0100)
commit83baa509396a742e0ce145b09fde1ce0a948f49a
treef0ad330579e1b21931d0bbcf7cdf13e9f11d839b
parenta06ba0f7f859f8e3b3b7f6d374cb39ce571239bf
ASoC: pxa: fix null-pointer dereference in filter()

[ Upstream commit ec7bf231aaa1bdbcb69d23bc50c753c80fb22429 ]

kasprintf() would return NULL pointer when kmalloc() fail to allocate.
Need to check the return pointer before calling strcmp().

Fixes: 7a824e214e25 ("ASoC: mmp: add audio dma support")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Link: https://lore.kernel.org/r/20221114085629.1910435-1-zengheng4@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/pxa/mmp-pcm.c