File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1244,7 +1244,7 @@ static void tsc_refine_calibration_work(struct work_struct *work)
1244
1244
1245
1245
/* Don't bother refining TSC on unstable systems */
1246
1246
if (tsc_unstable )
1247
- return ;
1247
+ goto unreg ;
1248
1248
1249
1249
/*
1250
1250
* Since the work is started early in boot, we may be
@@ -1297,11 +1297,12 @@ static void tsc_refine_calibration_work(struct work_struct *work)
1297
1297
1298
1298
out :
1299
1299
if (tsc_unstable )
1300
- return ;
1300
+ goto unreg ;
1301
1301
1302
1302
if (boot_cpu_has (X86_FEATURE_ART ))
1303
1303
art_related_clocksource = & clocksource_tsc ;
1304
1304
clocksource_register_khz (& clocksource_tsc , tsc_khz );
1305
+ unreg :
1305
1306
clocksource_unregister (& clocksource_tsc_early );
1306
1307
}
1307
1308
@@ -1311,8 +1312,8 @@ static int __init init_tsc_clocksource(void)
1311
1312
if (!boot_cpu_has (X86_FEATURE_TSC ) || tsc_disabled > 0 || !tsc_khz )
1312
1313
return 0 ;
1313
1314
1314
- if (check_tsc_unstable () )
1315
- return 0 ;
1315
+ if (tsc_unstable )
1316
+ goto unreg ;
1316
1317
1317
1318
if (tsc_clocksource_reliable )
1318
1319
clocksource_tsc .flags &= ~CLOCK_SOURCE_MUST_VERIFY ;
@@ -1328,6 +1329,7 @@ static int __init init_tsc_clocksource(void)
1328
1329
if (boot_cpu_has (X86_FEATURE_ART ))
1329
1330
art_related_clocksource = & clocksource_tsc ;
1330
1331
clocksource_register_khz (& clocksource_tsc , tsc_khz );
1332
+ unreg :
1331
1333
clocksource_unregister (& clocksource_tsc_early );
1332
1334
return 0 ;
1333
1335
}
You can’t perform that action at this time.
0 commit comments