summaryrefslogtreecommitdiffstats
path: root/drivers/tee/tee_shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tee/tee_shm.c')
-rw-r--r--drivers/tee/tee_shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
index 6f36da9ee412..556960a1bab3 100644
--- a/drivers/tee/tee_shm.c
+++ b/drivers/tee/tee_shm.c
@@ -283,7 +283,7 @@ struct tee_shm *tee_shm_register(struct tee_context *ctx, unsigned long addr,
if (rc > 0)
shm->num_pages = rc;
if (rc != num_pages) {
- if (rc > 0)
+ if (rc >= 0)
rc = -ENOMEM;
ret = ERR_PTR(rc);
goto err;