Merge tag 'thermal-v5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux
Pull thermal framework fix from Daniel Lezcano: "Fix NULL pointer access when the cooling device transition stats table failed to allocate due to a big number of states (Manaf Meethalavalappu Pallikunhi)" * tag 'thermal-v5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/core: Add NULL pointer check before using cooling device stats
This commit is contained in:
@@ -674,6 +674,9 @@ void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
|
||||
{
|
||||
struct cooling_dev_stats *stats = cdev->stats;
|
||||
|
||||
if (!stats)
|
||||
return;
|
||||
|
||||
spin_lock(&stats->lock);
|
||||
|
||||
if (stats->state == new_state)
|
||||
|
||||
Reference in New Issue
Block a user