[Intel-gfx] [PATCH v0 07/42] drm/i915: Check notifier registration return value
Borislav Petkov
bp at alien8.de
Mon Nov 8 10:11:22 UTC 2021
From: Borislav Petkov <bp at suse.de>
Avoid homegrown notifier registration checks.
No functional changes.
Signed-off-by: Borislav Petkov <bp at suse.de>
Cc: intel-gvt-dev at lists.freedesktop.org
Cc: intel-gfx at lists.freedesktop.org
---
drivers/gpu/drm/i915/gvt/scheduler.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index 6c804102528b..3bafaca5789f 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -1277,8 +1277,10 @@ int intel_gvt_init_workload_scheduler(struct intel_gvt *gvt)
gvt->shadow_ctx_notifier_block[i].notifier_call =
shadow_context_status_change;
- atomic_notifier_chain_register(&engine->context_status_notifier,
- &gvt->shadow_ctx_notifier_block[i]);
+
+ if (atomic_notifier_chain_register(&engine->context_status_notifier,
+ &gvt->shadow_ctx_notifier_block[i]))
+ pr_warn("Context status notifier %d already registered\n", i);
}
return 0;
--
2.29.2
More information about the Intel-gfx
mailing list