aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-05-24 09:53:36 -0400
committerTakashi Iwai <tiwai@suse.de>2017-06-14 01:44:19 -0400
commit4e99151435cb2e88b6d0d49939bf836c35e555a3 (patch)
treeb51c256edbf44f7648de4b377a38484a400f2c25 /sound/core
parent1b745cd97425f7b0b9d0c87c1b9766c31b7d0a7e (diff)
ALSA: pcm: Use common PCM_RUNTIME_CHECK() for sanity checks
Just a code cleanup. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_native.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 0941b9c92b3f..05858c91c0ea 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2869,7 +2869,7 @@ static int snd_pcm_playback_ioctl1(struct file *file,
2869 struct snd_pcm_substream *substream, 2869 struct snd_pcm_substream *substream,
2870 unsigned int cmd, void __user *arg) 2870 unsigned int cmd, void __user *arg)
2871{ 2871{
2872 if (snd_BUG_ON(!substream)) 2872 if (PCM_RUNTIME_CHECK(substream))
2873 return -ENXIO; 2873 return -ENXIO;
2874 if (snd_BUG_ON(substream->stream != SNDRV_PCM_STREAM_PLAYBACK)) 2874 if (snd_BUG_ON(substream->stream != SNDRV_PCM_STREAM_PLAYBACK))
2875 return -EINVAL; 2875 return -EINVAL;
@@ -2949,7 +2949,7 @@ static int snd_pcm_capture_ioctl1(struct file *file,
2949 struct snd_pcm_substream *substream, 2949 struct snd_pcm_substream *substream,
2950 unsigned int cmd, void __user *arg) 2950 unsigned int cmd, void __user *arg)
2951{ 2951{
2952 if (snd_BUG_ON(!substream)) 2952 if (PCM_RUNTIME_CHECK(substream))
2953 return -ENXIO; 2953 return -ENXIO;
2954 if (snd_BUG_ON(substream->stream != SNDRV_PCM_STREAM_CAPTURE)) 2954 if (snd_BUG_ON(substream->stream != SNDRV_PCM_STREAM_CAPTURE))
2955 return -EINVAL; 2955 return -EINVAL;