ASoC: rt5645: fix a NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Fri, 15 Mar 2019 03:48:32 +0000 (22:48 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 2 May 2019 01:46:12 +0000 (10:46 +0900)
commit51dd97d1df5fb9ac58b9b358e63e67b530f6ae21
tree22c262000af7b380cbfee7e6f8e331145c1206f2
parentd3692cb5c56daa2fb8046a8f4ebe1b2b8b22c895
ASoC: rt5645: fix a NULL pointer dereference

devm_kcalloc() may fail and return NULL. The fix returns ENOMEM
in case it fails to avoid NULL pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c