summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2013-07-29 13:40:22 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-12 02:38:41 +0400
commit353f59cac39bdcf4f5100fae723780d4f24a4a2f (patch)
tree6e88c353a4a7efd6d17513457c2688aa131c7a1e /sound
parent7b17c57914788c370756ddc7ed8ca1b43394ef0f (diff)
downloadlinux-353f59cac39bdcf4f5100fae723780d4f24a4a2f.tar.xz
ALSA: compress: fix the return value for SNDRV_COMPRESS_VERSION
commit a8d30608eaed6cc759b8e2e8a8bbbb42591f797f upstream. the return value of SNDRV_COMPRESS_VERSION always return default -ENOTTY as the return value was never updated for this call assign return value from put_user() Reported-by: Haynes <hgeorge@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/compress_offload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index a58cf3594130..84717ce23371 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -582,7 +582,7 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
mutex_lock(&stream->device->lock);
switch (_IOC_NR(cmd)) {
case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION):
- put_user(SNDRV_COMPRESS_VERSION,
+ retval = put_user(SNDRV_COMPRESS_VERSION,
(int __user *)arg) ? -EFAULT : 0;
break;
case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):