ALSA: compress: fix the return value for SNDRV_COMPRESS_VERSION

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>
CC: stable@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Vinod Koul and committed by
Takashi Iwai
a8d30608 43cbd286

+1 -1
+1 -1
sound/core/compress_offload.c
··· 743 mutex_lock(&stream->device->lock); 744 switch (_IOC_NR(cmd)) { 745 case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION): 746 - put_user(SNDRV_COMPRESS_VERSION, 747 (int __user *)arg) ? -EFAULT : 0; 748 break; 749 case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
··· 743 mutex_lock(&stream->device->lock); 744 switch (_IOC_NR(cmd)) { 745 case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION): 746 + retval = put_user(SNDRV_COMPRESS_VERSION, 747 (int __user *)arg) ? -EFAULT : 0; 748 break; 749 case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):