summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-05-04 14:59:09 +0100
committerTakashi Iwai <tiwai@suse.de>2016-05-09 17:35:32 +0200
commit5bd05390ff084d7a1ea7efa8f8dc111c24b2454c (patch)
tree4f110ab73928f8f0e2d1b71233566b9e60a4ca8b /sound/core
parent0b92b0cdbe419575b2233c08192b2ad28e7dbcfa (diff)
downloadop-kernel-dev-5bd05390ff084d7a1ea7efa8f8dc111c24b2454c.zip
op-kernel-dev-5bd05390ff084d7a1ea7efa8f8dc111c24b2454c.tar.gz
ALSA: compress: Remove pointless NULL check
stream can't be NULL here as we have just taken the address of it, so no need for the check. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/compress_offload.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 5268546..5215df2 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -392,9 +392,8 @@ static unsigned int snd_compr_poll(struct file *f, poll_table *wait)
if (snd_BUG_ON(!data))
return -EFAULT;
+
stream = &data->stream;
- if (snd_BUG_ON(!stream))
- return -EFAULT;
mutex_lock(&stream->device->lock);
if (stream->runtime->state == SNDRV_PCM_STATE_OPEN) {
@@ -799,9 +798,9 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
if (snd_BUG_ON(!data))
return -EFAULT;
+
stream = &data->stream;
- if (snd_BUG_ON(!stream))
- return -EFAULT;
+
mutex_lock(&stream->device->lock);
switch (_IOC_NR(cmd)) {
case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION):
OpenPOWER on IntegriCloud