forked from Mirrors/opensbi
lib: sbi: Return SBI_EALREADY error code if SSE event is present
Return SBI_EALREADY error code instead of SBI_EINVAL, in case an event is already added to the supported list. Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
8573a9b858
commit
b2e8e6986d
@@ -926,7 +926,7 @@ int sbi_sse_add_event(uint32_t event_id, const struct sbi_sse_cb_ops *cb_ops)
|
||||
/* Do not allow adding an event twice */
|
||||
info = sse_event_info_get(event_id);
|
||||
if (info)
|
||||
return SBI_EINVAL;
|
||||
return SBI_EALREADY;
|
||||
|
||||
if (cb_ops && cb_ops->set_hartid_cb && !EVENT_IS_GLOBAL(event_id))
|
||||
return SBI_EINVAL;
|
||||
|
Reference in New Issue
Block a user