• Pierre-Louis Bossart's avatar
    ASoC: rt5668: remove useless assignments · 6fa54456
    Pierre-Louis Bossart authored
    cppcheck warnings:
    
    sound/soc/codecs/rt5668.c:1177:6: style: Redundant initialization for
    'idx'. The initialized value is overwritten before it is
    read. [redundantInitialization]
     idx = rt5668_div_sel(rt5668, 1500000, div, ARRAY_SIZE(div));
         ^
    sound/soc/codecs/rt5668.c:1174:10: note: idx is initialized
     int idx = -EINVAL;
             ^
    sound/soc/codecs/rt5668.c:1177:6: note: idx is overwritten
     idx = rt5668_div_sel(rt5668, 1500000, div, ARRAY_SIZE(div));
         ^
    
    sound/soc/codecs/rt5668.c:1202:6: style: Redundant initialization for
    'idx'. The initialized value is overwritten before it is
    read. [redundantInitialization]
     idx = rt5668_div_sel(rt5668, ref, div, ARRAY_SIZE(div));
         ^
    sound/soc/codecs/rt5668.c:1191:25: note: idx is initialized
     int ref, val, reg, idx = -EINVAL;
                            ^
    sound/soc/codecs/rt5668.c:1202:6: note: idx is overwritten
     idx = rt5668_div_sel(rt5668, ref, div, ARRAY_SIZE(div));
         ^
    Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Link: https://lore.kernel.org/r/20210302212527.55158-19-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    6fa54456
rt5668.c 71.5 KB