forked from Mirrors/opensbi
lib: sbi: Fix domain_count check in sbi_domain_finalize()
The domain_count check in sbi_domain_finalize() for newly discovered domain is incorrect and should be reversed. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -371,7 +371,7 @@ int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid)
|
||||
* Ensure that we have room for Domain Index to
|
||||
* HART ID mapping
|
||||
*/
|
||||
if (domain_count <= SBI_DOMAIN_MAX_INDEX)
|
||||
if (SBI_DOMAIN_MAX_INDEX <= domain_count)
|
||||
return SBI_ENOSPC;
|
||||
|
||||
/* Sanitize discovered domain */
|
||||
|
Reference in New Issue
Block a user