aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/coretemp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index de8111114f46..6b3ef553bd13 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -541,16 +541,19 @@ static int __init coretemp_init(void)
541 " has no thermal sensor.\n", c->x86_model); 541 " has no thermal sensor.\n", c->x86_model);
542 } 542 }
543 } 543 }
544
545#ifndef CONFIG_HOTPLUG_CPU
544 if (list_empty(&pdev_list)) { 546 if (list_empty(&pdev_list)) {
545 err = -ENODEV; 547 err = -ENODEV;
546 goto exit_driver_unreg; 548 goto exit_driver_unreg;
547 } 549 }
550#endif
548 551
549 register_hotcpu_notifier(&coretemp_cpu_notifier); 552 register_hotcpu_notifier(&coretemp_cpu_notifier);
550 return 0; 553 return 0;
551 554
552exit_driver_unreg:
553#ifndef CONFIG_HOTPLUG_CPU 555#ifndef CONFIG_HOTPLUG_CPU
556exit_driver_unreg:
554 platform_driver_unregister(&coretemp_driver); 557 platform_driver_unregister(&coretemp_driver);
555#endif 558#endif
556exit: 559exit: