提交 21b3de88 编写于 作者: D Denis Kirjanov 提交者: Takashi Iwai

ALSA: als3000: check for the kzalloc return value

Signed-off-by: NDenis Kirjanov <kirjanov@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 edb66893
......@@ -394,6 +394,8 @@ static int snd_als300_playback_open(struct snd_pcm_substream *substream)
struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
GFP_KERNEL);
if (!data)
return -ENOMEM;
snd_als300_dbgcallenter();
chip->playback_substream = substream;
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),
GFP_KERNEL);
if (!data)
return -ENOMEM;
snd_als300_dbgcallenter();
chip->capture_substream = substream;
runtime->hw = snd_als300_capture_hw;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册