Message ID | 20181209150832.9366-1-colin.king@canonical.com |
---|---|
State | Accepted |
Commit | 33e7a8422546b5cd65d4af4dfe4ed92ea543d8df |
Headers | show |
Series |
|
Related | show |
Quoting Colin King (2018-12-09 07:08:32) > From: Colin Ian King <colin.king@canonical.com> > > 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 <colin.king@canonical.com> > --- Applied to clk-next
On Sun, Dec 09, 2018 at 03:08:32PM +0000, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > 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
On 11/12/2018 09:48, Dan Carpenter wrote: > On Sun, Dec 09, 2018 at 03:08:32PM +0000, Colin King wrote: >> From: Colin Ian King <colin.king@canonical.com> >> >> 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. > > regards, > dan carpenter >
diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c index 6d9d3714b4df..527ade1d6933 100644 --- a/drivers/clk/imx/clk-composite-8m.c +++ b/drivers/clk/imx/clk-composite-8m.c @@ -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,