ASoC: codecs:rx-macro: Fixing uninitialized variables.
Subsystems (3)
PATCH 1/1 ASoC: codecs:rx-macro: Fixing uninitialized variables.
Initializing the uninitialized variables to avoid any unexpected garbage value to be propagated further.
Signed-off-by Ravulapati Vishnu Vardhan Rao <[email protected]>
--- sound/soc/codecs/lpass-rx-macro.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/codecs/lpass-rx-macro.c +2 -0
@@ -2219,6 +2219,8 @@ static void rx_macro_hd2_control(struct snd_soc_component *component, u16 interp_idx, int event) {u16 hd2_scale_reg, hd2_enable_reg; + hd2_scale_reg =0 ; + hd2_enable_reg =0 ;switch (interp_idx) {case INTERP_HPHL :
Signature · 1 line
2.17.1
Mark Brown
maintainersound/soc/codecs/lpass-rx-macro.c static void rx_macro_hd2_control(struct snd_soc_component *component, · line 2226
Quoted 7 lines · Ravulapati Vishnu Vardhan Rao
{
sound/soc/codecs/lpass-rx-macro.c +2
-0u16 hd2_scale_reg, hd2_enable_reg; + hd2_scale_reg =0 ; + hd2_enable_reg =0 ;switch (interp_idx) {case INTERP_HPHL :
This is just shutting the warning up, it's not like 0 is ever a sensible value to use there.