Commit 21b3de88 authored by Denis Kirjanov's avatar Denis Kirjanov Committed by Takashi Iwai

ALSA: als3000: check for the kzalloc return value

Signed-off-by: default avatarDenis Kirjanov <kirjanov@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent edb66893
...@@ -394,6 +394,8 @@ static int snd_als300_playback_open(struct snd_pcm_substream *substream) ...@@ -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) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment