@@ -1040,20 +1040,25 @@ static int __init amd_uncore_init(void)
|
1040 | 1040 | /* |
1041 | 1041 | * Install callbacks. Core will call them for each online cpu. |
1042 | 1042 | */ |
1043 | | -if (cpuhp_setup_state(CPUHP_PERF_X86_AMD_UNCORE_PREP, |
1044 | | -"perf/x86/amd/uncore:prepare", |
1045 | | -NULL, amd_uncore_cpu_dead)) |
| 1043 | +ret = cpuhp_setup_state(CPUHP_PERF_X86_AMD_UNCORE_PREP, |
| 1044 | +"perf/x86/amd/uncore:prepare", |
| 1045 | +NULL, amd_uncore_cpu_dead); |
| 1046 | +if (ret) |
1046 | 1047 | goto fail; |
1047 | 1048 | |
1048 | | -if (cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING, |
1049 | | -"perf/x86/amd/uncore:starting", |
1050 | | -amd_uncore_cpu_starting, NULL)) |
| 1049 | +ret = cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING, |
| 1050 | +"perf/x86/amd/uncore:starting", |
| 1051 | +amd_uncore_cpu_starting, NULL); |
| 1052 | +if (ret) |
1051 | 1053 | goto fail_prep; |
1052 | | -if (cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_ONLINE, |
1053 | | -"perf/x86/amd/uncore:online", |
1054 | | -amd_uncore_cpu_online, |
1055 | | -amd_uncore_cpu_down_prepare)) |
| 1054 | + |
| 1055 | +ret = cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_ONLINE, |
| 1056 | +"perf/x86/amd/uncore:online", |
| 1057 | +amd_uncore_cpu_online, |
| 1058 | +amd_uncore_cpu_down_prepare); |
| 1059 | +if (ret) |
1056 | 1060 | goto fail_start; |
| 1061 | + |
1057 | 1062 | return 0; |
1058 | 1063 | |
1059 | 1064 | fail_start: |
|