lib: sbi: fwft: return SBI_EINVAL rather than SBI_ERR_INVALID_PARAM
authorClément Léger <cleger@rivosinc.com>
Mon, 24 Jun 2024 10:29:09 +0000 (12:29 +0200)
committerAnup Patel <anup@brainfault.org>
Wed, 26 Jun 2024 12:44:49 +0000 (18:14 +0530)
Error code returned by the ecall handles should use the defines from
sbi_ecall_interface.h rather than sbi_error.h.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_fwft.c

index 595819b6877fbd4455475bcb89d13cfa3cf15de6..f1ae91592fbc880f2e59586bed79cad12b23e994 100644 (file)
@@ -196,7 +196,7 @@ int sbi_fwft_set(enum sbi_fwft_feature_t feature, unsigned long value,
                return ret;
 
        if ((flags & ~SBI_FWFT_SET_FLAG_LOCK) != 0)
-               return SBI_ERR_INVALID_PARAM;
+               return SBI_EINVAL;
 
        if (conf->flags & SBI_FWFT_SET_FLAG_LOCK)
                return SBI_EDENIED;