mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
SoC: msm: audio-effects: return directly to avoid integer overflow
Return error code directly to avoid further integer overflow leading to buffer overflow. Change-Id: I8b74efda227726494724f4387c45b5b6fa04637b CRs-Fixed: 2077909 Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
This commit is contained in:
parent
931a70e8bf
commit
fac72253f4
1 changed files with 30 additions and 30 deletions
|
@ -155,7 +155,7 @@ int msm_audio_effects_virtualizer_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"VIRT ENABLE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_VIRTUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -183,7 +183,7 @@ int msm_audio_effects_virtualizer_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"VIRT STRENGTH", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_VIRTUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -211,7 +211,7 @@ int msm_audio_effects_virtualizer_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"VIRT OUT_TYPE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_VIRTUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -239,7 +239,7 @@ int msm_audio_effects_virtualizer_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"VIRT GAIN_ADJUST", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_VIRTUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -318,7 +318,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_ENABLE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -346,7 +346,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_MODE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -374,7 +374,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_PRESET", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -402,7 +402,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_WET_MIX", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -430,7 +430,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_GAIN_ADJUST", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -458,7 +458,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_ROOM_LEVEL", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -486,7 +486,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_ROOM_HF_LEVEL", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -514,7 +514,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_DECAY_TIME", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -542,7 +542,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_DECAY_HF_RATIO", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -570,7 +570,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_REFLECTIONS_LEVEL", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -598,7 +598,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_REFLECTIONS_DELAY", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -626,7 +626,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_LEVEL", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -654,7 +654,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_DELAY", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -682,7 +682,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_DIFFUSION", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -710,7 +710,7 @@ int msm_audio_effects_reverb_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"REVERB_DENSITY", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_REVERB;
|
||||
*updt_params++ =
|
||||
|
@ -790,7 +790,7 @@ int msm_audio_effects_bass_boost_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"BASS_BOOST_ENABLE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_BASS_BOOST;
|
||||
*updt_params++ =
|
||||
|
@ -818,7 +818,7 @@ int msm_audio_effects_bass_boost_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"BASS_BOOST_MODE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_BASS_BOOST;
|
||||
*updt_params++ =
|
||||
|
@ -846,7 +846,7 @@ int msm_audio_effects_bass_boost_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"BASS_BOOST_STRENGTH", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_BASS_BOOST;
|
||||
*updt_params++ =
|
||||
|
@ -924,7 +924,7 @@ int msm_audio_effects_pbe_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"PBE_ENABLE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_PBE;
|
||||
*updt_params++ =
|
||||
|
@ -950,7 +950,7 @@ int msm_audio_effects_pbe_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"PBE_PARAM", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_PBE;
|
||||
*updt_params++ =
|
||||
|
@ -1035,7 +1035,7 @@ int msm_audio_effects_popless_eq_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"EQ_ENABLE", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_POPLESS_EQUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -1103,7 +1103,7 @@ int msm_audio_effects_popless_eq_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"EQ_CONFIG", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_POPLESS_EQUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -1154,7 +1154,7 @@ int msm_audio_effects_popless_eq_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"EQ_BAND_INDEX", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_POPLESS_EQUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -1186,7 +1186,7 @@ int msm_audio_effects_popless_eq_handler(struct audio_client *ac,
|
|||
MAX_INBAND_PARAM_SZ,
|
||||
"EQ_SINGLE_BAND_FREQ", rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
*updt_params++ =
|
||||
AUDPROC_MODULE_ID_POPLESS_EQUALIZER;
|
||||
*updt_params++ =
|
||||
|
@ -1276,7 +1276,7 @@ static int __msm_audio_effects_volume_handler(struct audio_client *ac,
|
|||
"VOLUME/VOLUME2_GAIN_2CH",
|
||||
rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
if (instance == SOFT_VOLUME_INSTANCE_2)
|
||||
*updt_params++ =
|
||||
ASM_MODULE_ID_VOL_CTRL2;
|
||||
|
@ -1325,7 +1325,7 @@ static int __msm_audio_effects_volume_handler(struct audio_client *ac,
|
|||
"VOLUME/VOLUME2_GAIN_MASTER",
|
||||
rc);
|
||||
if (rc != 0)
|
||||
break;
|
||||
goto invalid_config;
|
||||
if (instance == SOFT_VOLUME_INSTANCE_2)
|
||||
*updt_params++ =
|
||||
ASM_MODULE_ID_VOL_CTRL2;
|
||||
|
|
Loading…
Reference in a new issue