linux/drivers/clk/st
Arnd Bergmann 84b02b209f clk: st: avoid uninitialized variable use
commit 2dd52d7f6f upstream.

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: Arnd Bergmann <arnd@arndb.de>
Fixes: 5f7aa9071e ("clk: st: Support for QUADFS inside ClockGenB/C/D/E/F")
Acked-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2016-02-02 19:27:05 +00:00
..
clkgen-fsyn.c clk: st: avoid uninitialized variable use 2016-02-02 19:27:05 +00:00
clkgen-mux.c clk: st: Support for A9 MUX clocks 2014-03-25 15:59:23 -07:00
clkgen-pll.c clk: st: Terminate of match table 2014-05-28 12:08:53 -07:00
clkgen.h clk: st: Support for PLLs inside ClockGenA(s) 2014-03-25 15:58:56 -07:00
Makefile clk: st: Support for QUADFS inside ClockGenB/C/D/E/F 2014-03-25 15:59:09 -07:00