diff options
author | Arnd Bergmann <arnd@arndb.de> | 2021-12-13 15:00:38 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2021-12-13 15:00:39 +0100 |
commit | df0a9b525cb31eab7e82f1d282f0b0af91f3ae7e (patch) | |
tree | de445b51cb3d626592f2e9b581eabb7b96edda2d /drivers | |
parent | 708038dc3715047bd967f232770dfa0adb911021 (diff) | |
parent | 9d7482771fac8d8e38e763263f2ca0ca12dd22c6 (diff) | |
download | linux-df0a9b525cb31eab7e82f1d282f0b0af91f3ae7e.tar.bz2 |
Merge tag 'amdtee-fix-for-v5.16' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes
AMD-TEE fix IS_ERR() bug
* tag 'amdtee-fix-for-v5.16' of git://git.linaro.org/people/jens.wiklander/linux-tee:
tee: amdtee: fix an IS_ERR() vs NULL bug
Link: https://lore.kernel.org/r/20211130070351.GA2308099@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tee/amdtee/core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c index da6b88e80dc0..297dc62bca29 100644 --- a/drivers/tee/amdtee/core.c +++ b/drivers/tee/amdtee/core.c @@ -203,9 +203,8 @@ static int copy_ta_binary(struct tee_context *ctx, void *ptr, void **ta, *ta_size = roundup(fw->size, PAGE_SIZE); *ta = (void *)__get_free_pages(GFP_KERNEL, get_order(*ta_size)); - if (IS_ERR(*ta)) { - pr_err("%s: get_free_pages failed 0x%llx\n", __func__, - (u64)*ta); + if (!*ta) { + pr_err("%s: get_free_pages failed\n", __func__); rc = -ENOMEM; goto rel_fw; } |