summaryrefslogtreecommitdiff
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-11-16 10:33:41 (GMT)
committerTakashi Iwai <tiwai@suse.de>2009-11-16 10:33:41 (GMT)
commitfe705ab1526bc2c8b7756f3a855f040ab2060af2 (patch)
treec4444d19983c5578f9ef2bddc1fa01b6e42f91a3 /sound/core/pcm.c
parent7d1794e81b5f202c73d7e3e65f0ee7aae4928038 (diff)
parentad1cd745060ae2f24026b3b3d09da3426df6ab36 (diff)
downloadlinux-fsl-qoriq-fe705ab1526bc2c8b7756f3a855f040ab2060af2.tar.xz
Merge branch 'topic/beep-rename' into topic/hda
Diffstat (limited to 'sound/core/pcm.c')
-rw-r--r--sound/core/pcm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 0c14401..c69c60b 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -953,11 +953,12 @@ static int snd_pcm_dev_register(struct snd_device *device)
struct snd_pcm_substream *substream;
struct snd_pcm_notify *notify;
char str[16];
- struct snd_pcm *pcm = device->device_data;
+ struct snd_pcm *pcm;
struct device *dev;
- if (snd_BUG_ON(!pcm || !device))
+ if (snd_BUG_ON(!device || !device->device_data))
return -ENXIO;
+ pcm = device->device_data;
mutex_lock(&register_mutex);
err = snd_pcm_add(pcm);
if (err) {