• Arnd Bergmann's avatar
    clk: st: avoid uninitialized variable use · 2dd52d7f
    Arnd Bergmann authored
    quadfs_pll_fs660c32_round_rate prints a few structure members
    that are never initialized, and also doesn't print the only one
    it cares about. We get a gcc warning about the ones that
    are printed:
    
    clk/st/clkgen-fsyn.c:560:93: warning: 'params.sdiv' may be used uninitialized in this function
    clk/st/clkgen-fsyn.c:560:93: warning: 'params.mdiv' may be used uninitialized in this function
    clk/st/clkgen-fsyn.c:560:93: warning: 'params.pe' may be used uninitialized in this function
    clk/st/clkgen-fsyn.c:560:93: warning: 'params.nsdiv' may be used uninitialized in this function
    
    This changes the code to no longer print uninitialized data, and
    for good measure it also prints the ndiv member that is being
    set.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Fixes: 5f7aa907 ("clk: st: Support for QUADFS inside ClockGenB/C/D/E/F")
    Acked-by: default avatarGabriel Fernandez <gabriel.fernandez@linaro.org>
    Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
    2dd52d7f
clkgen-fsyn.c 33.7 KB