summaryrefslogtreecommitdiff
path: root/drivers/clk/socfpga/clk-pll-s10.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-04-06 21:27:46 +0300
committerStephen Boyd <sboyd@kernel.org>2021-04-08 02:30:23 +0300
commit52d1a8da40b3c3e165e7b89d1a21a48da196792f (patch)
treeca6e323e83349aa0b70ba4f63e2eda33c531b83e /drivers/clk/socfpga/clk-pll-s10.c
parent657d4d1934f75a2d978c3cf2086495eaa542e7a9 (diff)
downloadlinux-52d1a8da40b3c3e165e7b89d1a21a48da196792f.tar.xz
clk: socfpga: remove redundant initialization of variable div
The variable div is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210406182746.432861-1-colin.king@canonical.com Acked-by: Dinh Nguyen <dinguyen@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/socfpga/clk-pll-s10.c')
-rw-r--r--drivers/clk/socfpga/clk-pll-s10.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/socfpga/clk-pll-s10.c b/drivers/clk/socfpga/clk-pll-s10.c
index bc37461d43c0..70076a80149d 100644
--- a/drivers/clk/socfpga/clk-pll-s10.c
+++ b/drivers/clk/socfpga/clk-pll-s10.c
@@ -107,7 +107,7 @@ static unsigned long clk_boot_clk_recalc_rate(struct clk_hw *hwclk,
unsigned long parent_rate)
{
struct socfpga_pll *socfpgaclk = to_socfpga_clk(hwclk);
- u32 div = 1;
+ u32 div;
div = ((readl(socfpgaclk->hw.reg) &
SWCTRLBTCLKSEL_MASK) >>