diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-02-15 21:22:00 +0100 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-03-05 18:19:40 +0800 |
commit | 38a2a48cd9e4697cb8942e56212610d4248ea34c (patch) | |
tree | bc2fa44aff8cb0ead641af2425d8873eae64277a /drivers/clk/intel/clk_intel.c | |
parent | e98ea49a0eac64ae8759ba45e4105bfb0be95dc2 (diff) | |
download | u-boot-38a2a48cd9e4697cb8942e56212610d4248ea34c.zip u-boot-38a2a48cd9e4697cb8942e56212610d4248ea34c.tar.gz u-boot-38a2a48cd9e4697cb8942e56212610d4248ea34c.tar.bz2 |
x86: remove dead code in intel_clk_get_rate()
If all branches of a switch statement have a return instruction, all
subsequent lines are unreachable.
Identified with cppcheck.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/clk/intel/clk_intel.c')
-rw-r--r-- | drivers/clk/intel/clk_intel.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/clk/intel/clk_intel.c b/drivers/clk/intel/clk_intel.c index d2e1549..b633934 100644 --- a/drivers/clk/intel/clk_intel.c +++ b/drivers/clk/intel/clk_intel.c @@ -11,8 +11,6 @@ static ulong intel_clk_get_rate(struct clk *clk) { - ulong rate; - switch (clk->id) { case CLK_I2C: /* Hard-coded to 133MHz on current platforms */ @@ -20,8 +18,6 @@ static ulong intel_clk_get_rate(struct clk *clk) default: return -ENODEV; } - - return rate; } static struct clk_ops intel_clk_ops = { |