mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
cpufreq: rockchip_big_little: fix panic when topology_physical_package_id return -1 if no cluster info in dts
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
This commit is contained in:
@@ -95,7 +95,10 @@ static unsigned int big_little = 1;
|
||||
/*******************************************************/
|
||||
static inline int cpu_to_cluster(int cpu)
|
||||
{
|
||||
return topology_physical_package_id(cpu);
|
||||
int id = topology_physical_package_id(cpu);
|
||||
if (id < 0)
|
||||
id = 0;
|
||||
return id;
|
||||
}
|
||||
|
||||
static unsigned int rockchip_bl_cpufreq_get_rate(unsigned int cpu)
|
||||
|
||||
Reference in New Issue
Block a user