ASoC: test-component: fix null pointer dereference.
authorAmeer Hamza <amhamza.mgc@gmail.com>
Tue, 7 Dec 2021 14:23:09 +0000 (19:23 +0500)
committerMark Brown <broonie@kernel.org>
Thu, 9 Dec 2021 12:31:50 +0000 (12:31 +0000)
commitbefe304536eeef71f8529ff877444ae2b72a37db
tree2a085964cf07ebf72f4a34f732764ec40ab593b1
parent5f9155a7d2dc067d72a95b42168f944c7710c0d5
ASoC: test-component: fix null pointer dereference.

Dereferncing of_id pointer will result in exception in current
implementation since of_match_device() will assign it to NULL.
Adding NULL check for protection.

Signed-off-by: Ameer Hamza <amhamza.mgc@gmail.com>
Link: https://lore.kernel.org/r/20211207142309.222820-1-amhamza.mgc@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/test-component.c