From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130911042913.552346146@goodmis.org> Date: Wed, 11 Sep 2013 00:29:15 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Haynes , Vinod Koul , Takashi Iwai Subject: [128/251] ALSA: compress: fix the return value for SNDRV_COMPRESS_VERSION References: <20130911042707.738353451@goodmis.org> Content-Disposition: inline; filename=0128-ALSA-compress-fix-the-return-value-for-SNDRV_COMPRES.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.9-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Vinod Koul [ Upstream commit a8d30608eaed6cc759b8e2e8a8bbbb42591f797f ] 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 CC: stable@vger.kernel.org Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai Signed-off-by: Steven Rostedt --- sound/core/compress_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index d5103f7..20f55e2 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): -- 1.7.10.4