• Jean-Francois Moine's avatar
    ASoC: kirkwood-i2s: fix a compilation warning · 8a537f85
    Jean-Francois Moine authored
    In the function kirkwood_set_rate, when the rate cannot be satisfied
    by the internal nor by an external clock, the clock source in undefined:
    
     warning: ‘clks_ctrl’ may be used uninitialized in this function
    
    The ALSA subsystem should never gives such a rate because:
    - the rates with the internal clock are limited to 44.1, 48 and 96 kHz
      as specified by the kirkwood_i2s_dai structure,
    - the other rates are proposed in the structure kirkwood_i2s_dai_extclk
      only when the external clock is present.
    
    In case of programming error (bad rate for internal clock and no
    external clock), the function will simply cause a backtrace.
    Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    8a537f85
kirkwood-i2s.c 14.3 KB