mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-18 22:14:16 +00:00 
			
		
		
		
	clocksource/drivers/cadence-ttc: Add missing clk_disable_unprepare in ttc_setup_clockevent
Add the missing clk_disable_unprepare() before return in ttc_setup_clockevent(). Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20240803064253.331946-3-cuigaosheng1@huawei.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
		
							parent
							
								
									6cc11b65e5
								
							
						
					
					
						commit
						2e02da1d86
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -435,7 +435,7 @@ static int __init ttc_setup_clockevent(struct clk *clk, | |||
| 				    &ttcce->ttc.clk_rate_change_nb); | ||||
| 	if (err) { | ||||
| 		pr_warn("Unable to register clock notifier.\n"); | ||||
| 		goto out_kfree; | ||||
| 		goto out_clk_unprepare; | ||||
| 	} | ||||
| 
 | ||||
| 	ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk); | ||||
|  | @ -465,13 +465,15 @@ static int __init ttc_setup_clockevent(struct clk *clk, | |||
| 	err = request_irq(irq, ttc_clock_event_interrupt, | ||||
| 			  IRQF_TIMER, ttcce->ce.name, ttcce); | ||||
| 	if (err) | ||||
| 		goto out_kfree; | ||||
| 		goto out_clk_unprepare; | ||||
| 
 | ||||
| 	clockevents_config_and_register(&ttcce->ce, | ||||
| 			ttcce->ttc.freq / PRESCALE, 1, 0xfffe); | ||||
| 
 | ||||
| 	return 0; | ||||
| 
 | ||||
| out_clk_unprepare: | ||||
| 	clk_disable_unprepare(ttcce->ttc.clk); | ||||
| out_kfree: | ||||
| 	kfree(ttcce); | ||||
| 	return err; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Gaosheng Cui
						Gaosheng Cui