mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Handling for invalid event argument
Signed-off-by: Kanhaiya Singh <kanhaiya.singh@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
be7ae13911
commit
9ff19c5fbd
@@ -97,6 +97,9 @@ bool LinuxEventsImp::eventListen(zes_event_type_flags_t &pEvent, uint32_t timeou
|
||||
}
|
||||
|
||||
ze_result_t LinuxEventsImp::eventRegister(zes_event_type_flags_t events) {
|
||||
if (0x7fff < events) {
|
||||
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
|
||||
}
|
||||
registeredEvents = events;
|
||||
if (registeredEvents & ZES_EVENT_TYPE_FLAG_MEM_HEALTH) {
|
||||
memHealthAtEventRegister = currentMemHealth();
|
||||
|
||||
Reference in New Issue
Block a user