diff options
author | Arnd Bergmann <arnd@arndb.de> | 2022-02-18 17:30:00 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2022-02-18 17:30:01 +0100 |
commit | 4f6668f05206d8b69cb0f52a635116b119dd6a27 (patch) | |
tree | 2f14d1873f2c46918124eeb65b3aa6a26fda3bb4 /drivers/tee | |
parent | 35f5417911753c7e815a5a2fbfc7c79648ecd8b6 (diff) | |
parent | 40eb0dcf4114cbfff4d207890fa5a19e82da9fdc (diff) |
Merge tag 'optee-fix2-for-v5.17' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes
OP-TEE fix error return code in probe functions
* tag 'optee-fix2-for-v5.17' of git://git.linaro.org/people/jens.wiklander/linux-tee:
tee: optee: fix error return code in probe function
Link: https://lore.kernel.org/r/20220214125931.GA1332792@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/tee')
-rw-r--r-- | drivers/tee/optee/ffa_abi.c | 4 | ||||
-rw-r--r-- | drivers/tee/optee/smc_abi.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index f2bf6c61197f..f744ab15bf2c 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -869,8 +869,10 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev) optee_supp_init(&optee->supp); ffa_dev_set_drvdata(ffa_dev, optee); ctx = teedev_open(optee->teedev); - if (IS_ERR(ctx)) + if (IS_ERR(ctx)) { + rc = PTR_ERR(ctx); goto err_rhashtable_free; + } optee->ctx = ctx; rc = optee_notif_init(optee, OPTEE_DEFAULT_MAX_NOTIF_VALUE); if (rc) diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c index 1a55339c7072..c517d310249f 100644 --- a/drivers/tee/optee/smc_abi.c +++ b/drivers/tee/optee/smc_abi.c @@ -1417,8 +1417,10 @@ static int optee_probe(struct platform_device *pdev) platform_set_drvdata(pdev, optee); ctx = teedev_open(optee->teedev); - if (IS_ERR(ctx)) + if (IS_ERR(ctx)) { + rc = PTR_ERR(ctx); goto err_supp_uninit; + } optee->ctx = ctx; rc = optee_notif_init(optee, max_notif_value); if (rc) |