-
由 Ranjani Sridharan 提交于
When the ASoC card registration fails and the codec component driver never probes, the codec device is not initialized and therefore memory for codec->wcaps is not allocated. This results in a NULL pointer dereference when the codec driver suspend callback is invoked during system suspend. Fix this by returning without performing any actions during codec suspend/resume if the card was not registered successfully. Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200728231011.1454066-1-ranjani.sridharan@linux.intel.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
7fcd9bb5