aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/resctrl/core.c2
-rw-r--r--arch/x86/kernel/cpu/resctrl/ctrlmondata.c2
-rw-r--r--arch/x86/kernel/cpu/resctrl/rdtgroup.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index 2ec252be4ed9..c3a9dc63edf2 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -454,7 +454,7 @@ struct rdt_domain *rdt_find_domain(struct rdt_resource *r, int id,
454 struct list_head *l; 454 struct list_head *l;
455 455
456 if (id < 0) 456 if (id < 0)
457 return ERR_PTR(id); 457 return ERR_PTR(-ENODEV);
458 458
459 list_for_each(l, &r->domains) { 459 list_for_each(l, &r->domains) {
460 d = list_entry(l, struct rdt_domain, list); 460 d = list_entry(l, struct rdt_domain, list);
diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
index ba11f54f5ab8..3b943ace786c 100644
--- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
+++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
@@ -534,7 +534,7 @@ int rdtgroup_mondata_show(struct seq_file *m, void *arg)
534 534
535 r = &rdt_resources_all[resid]; 535 r = &rdt_resources_all[resid];
536 d = rdt_find_domain(r, domid, NULL); 536 d = rdt_find_domain(r, domid, NULL);
537 if (!d) { 537 if (IS_ERR_OR_NULL(d)) {
538 ret = -ENOENT; 538 ret = -ENOENT;
539 goto out; 539 goto out;
540 } 540 }
diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index 017505017bdb..8388adf241b2 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -1029,7 +1029,7 @@ static int rdt_cdp_peer_get(struct rdt_resource *r, struct rdt_domain *d,
1029 * peer RDT CDP resource. Hence the WARN. 1029 * peer RDT CDP resource. Hence the WARN.
1030 */ 1030 */
1031 _d_cdp = rdt_find_domain(_r_cdp, d->id, NULL); 1031 _d_cdp = rdt_find_domain(_r_cdp, d->id, NULL);
1032 if (WARN_ON(!_d_cdp)) { 1032 if (WARN_ON(IS_ERR_OR_NULL(_d_cdp))) {
1033 _r_cdp = NULL; 1033 _r_cdp = NULL;
1034 ret = -EINVAL; 1034 ret = -EINVAL;
1035 } 1035 }