Unverified Commit df0a9b52 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'amdtee-fix-for-v5.16' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 708038dc 9d748277
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;
	}