mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 05:56:11 +07:00
ALSA: als3000: check for the kzalloc return value
Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
edb6689386
commit
21b3de881b
@ -394,6 +394,8 @@ static int snd_als300_playback_open(struct snd_pcm_substream *substream)
|
|||||||
struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
|
struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
return -ENOMEM;
|
||||||
snd_als300_dbgcallenter();
|
snd_als300_dbgcallenter();
|
||||||
chip->playback_substream = substream;
|
chip->playback_substream = substream;
|
||||||
runtime->hw = snd_als300_playback_hw;
|
runtime->hw = snd_als300_playback_hw;
|
||||||
@ -425,6 +427,8 @@ static int snd_als300_capture_open(struct snd_pcm_substream *substream)
|
|||||||
struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
|
struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
return -ENOMEM;
|
||||||
snd_als300_dbgcallenter();
|
snd_als300_dbgcallenter();
|
||||||
chip->capture_substream = substream;
|
chip->capture_substream = substream;
|
||||||
runtime->hw = snd_als300_capture_hw;
|
runtime->hw = snd_als300_capture_hw;
|
||||||
|
Loading…
Reference in New Issue
Block a user