drivers: thermal: Add valid cpu check in cpu isolate driver
Add a check for valid cpu and create cpu isolation cooling device only for those cpu's which passes this check. Change-Id: Ic931a1aa51857ed109555e055879cb39da11f3cf Signed-off-by: Priyansh Jain <quic_priyjain@quicinc.com>
This commit is contained in:
1 parent
b5bac2400f
commit
d6f59978b7
1 file changed
+6
@@ -318,6 +318,12 @@ static int cpu_isolate_probe(struct platform_device *pdev)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (cpu_isolate_cdev->cpu_id == -1) {
|
||||
dev_err(&pdev->dev, "Invalid CPU phandle\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
INIT_WORK(&cpu_isolate_cdev->reg_work,
|
||||
cpu_isolate_register_cdev);
|
||||
list_add(&cpu_isolate_cdev->node, &cpu_isolate_cdev_list);
|
||||
|
||||
Reference in new issue
Block a user