diff options
| author | Himanshu Chauhan <[email protected]> | 2025-02-20 14:44:41 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-03-23 21:17:36 +0530 |
| commit | b2e8e6986d676005f23fc5e3b3845b027fc4330f (patch) | |
| tree | 9fc7b5849279a2ef4683719a4a028a90cb82e93f /lib | |
| parent | 8573a9b8580938fd8c5f1bc1e7b59ef841ce8564 (diff) | |
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 <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sbi/sbi_sse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_sse.c b/lib/sbi/sbi_sse.c index 2f9bdef8..ff2745a3 100644 --- a/lib/sbi/sbi_sse.c +++ b/lib/sbi/sbi_sse.c @@ -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; |
