mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
s390/cpum_sf: do not register PMU if no sampling mode is authorized
Previously, the cpum_sf PMU was registered even if there is no sampling mode authorized. Add a check and register cpum_sf only at least one sampling mode is authorized. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
parent
3d43b981eb
commit
9232c3c741
1 changed files with 3 additions and 0 deletions
|
|
@ -1938,6 +1938,9 @@ static int __init init_cpum_sampling_pmu(void)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!si.as && !si.ad)
|
||||
return -ENODEV;
|
||||
|
||||
if (si.bsdes != sizeof(struct hws_basic_entry)) {
|
||||
pr_cpumsf_err(RS_INIT_FAILURE_BSDES);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue