mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	clk: tegra: fix error return case for recalc_rate
tegra-bpmp clocks driver makes implicit conversion of signed error
code to unsigned value in recalc_rate operation. The behavior for
recalc_rate, according to it's specification, should be that "If the
driver cannot figure out a rate for this clock, it must return 0."
Fixes: ca6f2796ee ("clk: tegra: Add BPMP clock driver")
Signed-off-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Link: https://lore.kernel.org/r/20230912112951.2330497-1-cyndis@kapsi.fi
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
			
			
This commit is contained in:
		
							parent
							
								
									83df5bf010
								
							
						
					
					
						commit
						a47b44fbb1
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -159,7 +159,7 @@ static unsigned long tegra_bpmp_clk_recalc_rate(struct clk_hw *hw,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = tegra_bpmp_clk_transfer(clk->bpmp, &msg);
 | 
						err = tegra_bpmp_clk_transfer(clk->bpmp, &msg);
 | 
				
			||||||
	if (err < 0)
 | 
						if (err < 0)
 | 
				
			||||||
		return err;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return response.rate;
 | 
						return response.rate;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue