ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 15 Jun 2021 01:39:22 +0000 (09:39 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 21 Jun 2021 12:03:18 +0000 (13:03 +0100)
commita2f6ed4a44721d3a9fdf4da7e0743cb13866bf61
tree4ae1a3c0d42d58d827de42adaccbf1ba4266c6e7
parent67798860e6d0114149562e6897cf07ba4bebc1d6
ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname()

It will cause null-ptr-deref if platform_get_resource_byname() returns NULL,
we need check the return value.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-10-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_xcvr.c