Skip to content

Commit 4f6668f

Browse files
committed
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 <[email protected]>
2 parents 35f5417 + 40eb0dc commit 4f6668f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/tee/optee/ffa_abi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,10 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
869869
optee_supp_init(&optee->supp);
870870
ffa_dev_set_drvdata(ffa_dev, optee);
871871
ctx = teedev_open(optee->teedev);
872-
if (IS_ERR(ctx))
872+
if (IS_ERR(ctx)) {
873+
rc = PTR_ERR(ctx);
873874
goto err_rhashtable_free;
875+
}
874876
optee->ctx = ctx;
875877
rc = optee_notif_init(optee, OPTEE_DEFAULT_MAX_NOTIF_VALUE);
876878
if (rc)

drivers/tee/optee/smc_abi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,8 +1417,10 @@ static int optee_probe(struct platform_device *pdev)
14171417

14181418
platform_set_drvdata(pdev, optee);
14191419
ctx = teedev_open(optee->teedev);
1420-
if (IS_ERR(ctx))
1420+
if (IS_ERR(ctx)) {
1421+
rc = PTR_ERR(ctx);
14211422
goto err_supp_uninit;
1423+
}
14221424
optee->ctx = ctx;
14231425
rc = optee_notif_init(optee, max_notif_value);
14241426
if (rc)

0 commit comments

Comments
 (0)