diff options
-rw-r--r-- | drivers/tee/tee_shm.c | 2 |
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, | |||
283 | if (rc > 0) | 283 | if (rc > 0) |
284 | shm->num_pages = rc; | 284 | shm->num_pages = rc; |
285 | if (rc != num_pages) { | 285 | if (rc != num_pages) { |
286 | if (rc > 0) | 286 | if (rc >= 0) |
287 | rc = -ENOMEM; | 287 | rc = -ENOMEM; |
288 | ret = ERR_PTR(rc); | 288 | ret = ERR_PTR(rc); |
289 | goto err; | 289 | goto err; |