ASoC: rt5677: Add missing null check for failed allocation of rt5677_dsp
The allocation of rt5677_dsp can potentially fail and return null, so add a null check and return -ENOMEM on a memory allocation failure. Addresses-Coverity: ("Dereference null return") Fixes: a0e0d135 ("ASoC: rt5677: Add a PCM device for streaming hotword via SPI") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20191024124610.18182-1-colin.king@canonical.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment