aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/als300.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/als300.c')
-rw-r--r--sound/pci/als300.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/als300.c b/sound/pci/als300.c
index 68c4469c6d19..5af3cb6b0c18 100644
--- a/sound/pci/als300.c
+++ b/sound/pci/als300.c
@@ -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;
@@ -765,7 +769,7 @@ static int __devinit snd_als300_create(struct snd_card *card,
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int snd_als300_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);