From 79db30efed4112d813c56decd8e6b3fe43569214 Mon Sep 17 00:00:00 2001 From: Luo Qiu Date: Wed, 27 Sep 2023 17:19:59 +0800 Subject: [PATCH] tee: optee: fix return type mismatch build warning KylinSec inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I901PJ -------------------------------- drivers/tee/optee/core.c: In function 'optee_probe': drivers/tee/optee/core.c:627:24: warning: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] 627 | return ERR_PTR(-EINVAL); | ^~~~~~~~~~~~~~~~ Fixes: 595311cf7e49c ("optee: model OP-TEE as a platform device/driver") Signed-off-by: Luo Qiu --- drivers/tee/optee/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 51d20d234c61..42b3fa09cc8f 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -624,7 +624,7 @@ static int optee_probe(struct platform_device *pdev) * doesn't have any reserved memory we can use we can't continue. */ if (!(sec_caps & OPTEE_SMC_SEC_CAP_HAVE_RESERVED_SHM)) - return ERR_PTR(-EINVAL); + return -EINVAL; pool = optee_config_shm_memremap(invoke_fn, &memremaped_shm, sec_caps); if (IS_ERR(pool)) -- Gitee