ASoC: fix NULL pointer dereference in soc_suspend()
In case the initalization of an soc_device failed, there is no codec associated with it. soc_suspend() will still dereference the pointer and cause an Ooops when entering the sleep mode. This happens on our board with a multi-target kernel image when booted on a machine without audio circuits. This patch makes the code bail out very early in this special case. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Showing
想要评论请 注册 或 登录