Commit 01fdcb8
ALSA: hda: fix NULL pointer dereference during suspend
[ Upstream commit 7fcd9bb ]
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: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200728231011.1454066-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent eb96e4f commit 01fdcb8
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2924 | 2924 | | |
2925 | 2925 | | |
2926 | 2926 | | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
2927 | 2931 | | |
2928 | 2932 | | |
2929 | 2933 | | |
| |||
2938 | 2942 | | |
2939 | 2943 | | |
2940 | 2944 | | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
2941 | 2949 | | |
2942 | 2950 | | |
2943 | 2951 | | |
| |||
0 commit comments