diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-11-08 15:58:25 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-11-08 15:58:25 +0100 |
commit | 17a4adbe68c8e6c1fde8decb2345dc4acea87934 (patch) | |
tree | 16d772ee8b5904ad9b92e1514e131bc504a079ae /sound/core/pcm_native.c | |
parent | c9adeefda0e29bed628e40e7f9da1f84243937e7 (diff) | |
parent | 8bb4d9ce08b0a92ca174e41d92c180328f86173f (diff) | |
download | blackbird-op-linux-17a4adbe68c8e6c1fde8decb2345dc4acea87934.tar.gz blackbird-op-linux-17a4adbe68c8e6c1fde8decb2345dc4acea87934.zip |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index b329ca58e63c..c76f6375a96b 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2124,7 +2124,8 @@ static int snd_pcm_playback_open(struct inode *inode, struct file *file) pcm = snd_lookup_minor_data(iminor(inode), SNDRV_DEVICE_TYPE_PCM_PLAYBACK); err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); - snd_card_unref(pcm->card); + if (pcm) + snd_card_unref(pcm->card); return err; } @@ -2137,7 +2138,8 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file) pcm = snd_lookup_minor_data(iminor(inode), SNDRV_DEVICE_TYPE_PCM_CAPTURE); err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); - snd_card_unref(pcm->card); + if (pcm) + snd_card_unref(pcm->card); return err; } |