Commit 38253922 authored by Henry Martin's avatar Henry Martin Committed by Greg Kroah-Hartman
Browse files

ASoC: imx-card: Add NULL check in imx_card_probe()



[ Upstream commit 93d34608 ]

devm_kasprintf() returns NULL when memory allocation fails. Currently,
imx_card_probe() does not check for this case, which results in a NULL
pointer dereference.

Add NULL check after devm_kasprintf() to prevent this issue.

Fixes: aa736700 ("ASoC: imx-card: Add imx-card machine driver")
Signed-off-by: default avatarHenry Martin <bsdhenrymartin@gmail.com>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250401142510.29900-1-bsdhenrymartin@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8d78931a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment