clk: vt8500: fix gcc-4.9 warnings
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Jun 2016 21:56:09 +0000 (00:56 +0300)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 21 Jun 2016 00:47:52 +0000 (17:47 -0700)
commit27a0becc26ba7f84babda8c66170827af1fa308d
tree0921513bf90d840e6f5fccea31b800d4c681f069
parent06b37e4a6ef2d392f3f35c94a9fe5d43f09f36c7
clk: vt8500: fix gcc-4.9 warnings

This fixes some false positive warnings we get with older compiler
versions:

clk-vt8500.c: In function ‘wm8650_find_pll_bits’:
clk-vt8500.c:430:12: ‘best_div2’ may be used uninitialized in this function
clk-vt8500.c:429:12: ‘best_div1’ may be used uninitialized in this function
clk-vt8500.c:428:14: ‘best_mul’ may be used uninitialized in this function
clk-vt8500.c: In function ‘wm8750_find_pll_bits’:
clk-vt8500.c:509:12: ‘best_div2’ may be used uninitialized in this function
clk-vt8500.c:508:12: ‘best_div1’ may be used uninitialized in this function
clk-vt8500.c:507:14: ‘best_mul’ may be used uninitialized in this function
clk-vt8500.c: In function ‘wm8850_find_pll_bits’:
clk-vt8500.c:560:12: ‘best_div2’ may be used uninitialized in this function
clk-vt8500.c:559:12: ‘best_div1’ may be used uninitialized in this function
clk-vt8500.c:558:14: ‘best_mul’ may be used uninitialized in this function

As the local variables are only use for temporaries, we can just
as well assign the final values directly, which also makes the
code slightly shorter.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Roman Volkov <rvolkov@v1ros.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-vt8500.c