mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ASoC: dsp: amrwb_in: Fix AUDIO_GET_AMRWB_ENC_CONFIG ioctl
The non-blocking if-statement here causes the AUDIO_GET_AMRWB_ENC_CONFIG ioctl to always return -EFAULT, even upon success. Fix it by correctly guarding the -EFAULT return value. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
parent
8c056fed40
commit
1ca541a2d4
@ -160,10 +160,11 @@ static long amrwb_in_ioctl(struct file *file,
|
||||
}
|
||||
case AUDIO_GET_AMRWB_ENC_CONFIG: {
|
||||
if (copy_to_user((void *)arg, audio->enc_cfg,
|
||||
sizeof(struct msm_audio_amrwb_enc_config)))
|
||||
sizeof(struct msm_audio_amrwb_enc_config))) {
|
||||
pr_err("%s: copy_to_user for AUDIO_GET_AMRWB_ENC_CONFIG failed\n",
|
||||
__func__);
|
||||
rc = -EFAULT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AUDIO_SET_AMRWB_ENC_CONFIG: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user