[PATCH 04/18] dbtr: Return correct error on install not supported

Nicholas Piggin
2026-03-13T05:20:38Z

Return SBI_ERR_NOT_SUPPORTED if a trigger is valid but not
supported.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
lib/sbi/sbi_dbtr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sbi/sbi_dbtr.c b/lib/sbi/sbi_dbtr.c
index 10ed6b3e..65c3b2df 100644
--- a/lib/sbi/sbi_dbtr.c
+++ b/lib/sbi/sbi_dbtr.c
@@ -617,7 +617,7 @@ int sbi_dbtr_install_trig(unsigned long smode,
*out = _idx;
sbi_hart_protection_unmap_range((unsigned long)shmem_base,
trig_count * sizeof(*entry));
- return SBI_ERR_FAILED;
+ return SBI_ERR_NOT_SUPPORTED;
}

if (!dbtr_trigger_valid(TDATA1_GET_TYPE(tdata1), tdata1)) {