Re: [PATCH] tee: amdtee: fix an IS_ERR() vs NULL bug

From: Dan Carpenter
Date: Mon Nov 29 2021 - 03:59:49 EST


On Mon, Nov 29, 2021 at 04:31:51PM +0800, 994605959 wrote:
> maybe try this?
> -  if (IS_ERR(*ta)) {
> -    pr_err("%s: get_free_pages failed 0x%llx\n", __func__,
> -           (u64)*ta);
> +  if (IS_ERR(ta)) {
> +    pr_err("%s: get_free_pages failed %p\n", __func__, ta);


No, what you are suggesting is totally wrong. You are checking the
wrong variable for the wrong thing.

regards,
dan carpenter