diff options
-rw-r--r-- | drivers/hwmon/coretemp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 17817473048..3cf235385f8 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -752,6 +752,10 @@ static void __cpuinit put_core_offline(unsigned int cpu) | |||
752 | 752 | ||
753 | indx = TO_ATTR_NO(cpu); | 753 | indx = TO_ATTR_NO(cpu); |
754 | 754 | ||
755 | /* The core id is too big, just return */ | ||
756 | if (indx > MAX_CORE_DATA - 1) | ||
757 | return; | ||
758 | |||
755 | if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu) | 759 | if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu) |
756 | coretemp_remove_core(pdata, &pdev->dev, indx); | 760 | coretemp_remove_core(pdata, &pdev->dev, indx); |
757 | 761 | ||