clk: imx: remove redundant initialization of ret to zero
PATCH 1/1 clk: imx: remove redundant initialization of ret to zero
From: Colin Ian King <[email protected]>
The initialization of ret is redundant as it is being re-assigned to the return value from the call to imx8m_clk_composite_compute_dividers. Clean this up by removing the initialization.
--- drivers/clk/imx/clk-composite-8m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-composite-8m.c +1 -1
@@ -93,7 +93,7 @@ static int imx8m_clk_composite_divider_set_rate(struct clk_hw *hw,unsigned long flags =0 ;int prediv_value;int div_value; -int ret =0 ; +int ret;u32 val; ret = imx8m_clk_composite_compute_dividers(rate, parent_rate,
Signature · 1 line
2.19.1
Quoting Colin King (2018-12-09 07:08:32)
Quoted 8 lines
From: Colin Ian King <[email protected]>
The initialization of ret is redundant as it is being re-assigned to the return value from the call to
imx8m_clk_composite_compute_dividers. Clean this up by removing the initialization.Signed-off-by Colin Ian King <[email protected]>---
Applied to clk-next
Quoted 6 lines · Colin King
From: Colin Ian King <[email protected]>
The initialization of ret is redundant as it is being re-assigned to the return value from the call to
imx8m_clk_composite_compute_dividers. Clean this up by removing the initialization.
Just curious, is there a static checker which complains about this as dead code?
regards,
dan carpenter
Quoted 10 lines · Dan Carpenter
Quoted 6 lines · Colin King
From: Colin Ian King <[email protected]>
The initialization of ret is redundant as it is being re-assigned to the return value from the call to
imx8m_clk_composite_compute_dividers. Clean this up by removing the initialization.Just curious, is there a static checker which complains about this as dead code?
If I recall correctly, cppcheck, but I may be wrong, I use several different tools.
Quoted 4 lines
regards,
dan carpenter