aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hwmon/coretemp.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index c05dc91ff419..49d74d091fbf 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -540,12 +540,9 @@ static int __init coretemp_init(void)
540 * sensors. We check this bit only, all the early CPUs 540 * sensors. We check this bit only, all the early CPUs
541 * without thermal sensors will be filtered out. 541 * without thermal sensors will be filtered out.
542 */ 542 */
543 if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) { 543 if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01))
544 err = coretemp_device_add(i); 544 coretemp_device_add(i);
545 if (err) 545 else {
546 goto exit_devices_unreg;
547
548 } else {
549 printk(KERN_INFO DRVNAME ": CPU (model=0x%x)" 546 printk(KERN_INFO DRVNAME ": CPU (model=0x%x)"
550 " has no thermal sensor.\n", c->x86_model); 547 " has no thermal sensor.\n", c->x86_model);
551 } 548 }
@@ -560,14 +557,6 @@ static int __init coretemp_init(void)
560#endif 557#endif
561 return 0; 558 return 0;
562 559
563exit_devices_unreg:
564 mutex_lock(&pdev_list_mutex);
565 list_for_each_entry_safe(p, n, &pdev_list, list) {
566 platform_device_unregister(p->pdev);
567 list_del(&p->list);
568 kfree(p);
569 }
570 mutex_unlock(&pdev_list_mutex);
571exit_driver_unreg: 560exit_driver_unreg:
572#ifndef CONFIG_HOTPLUG_CPU 561#ifndef CONFIG_HOTPLUG_CPU
573 platform_driver_unregister(&coretemp_driver); 562 platform_driver_unregister(&coretemp_driver);