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>
This commit is contained in:
		
							parent
							
								
									e98ea49a0e
								
							
						
					
					
						commit
						38a2a48cd9
					
				| 
						 | 
					@ -11,8 +11,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static ulong intel_clk_get_rate(struct clk *clk)
 | 
					static ulong intel_clk_get_rate(struct clk *clk)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	ulong rate;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	switch (clk->id) {
 | 
						switch (clk->id) {
 | 
				
			||||||
	case CLK_I2C:
 | 
						case CLK_I2C:
 | 
				
			||||||
		/* Hard-coded to 133MHz on current platforms */
 | 
							/* Hard-coded to 133MHz on current platforms */
 | 
				
			||||||
| 
						 | 
					@ -20,8 +18,6 @@ static ulong intel_clk_get_rate(struct clk *clk)
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
		return -ENODEV;
 | 
							return -ENODEV;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	return rate;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct clk_ops intel_clk_ops = {
 | 
					static struct clk_ops intel_clk_ops = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue