Commit 4f6668f0 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'optee-fix2-for-v5.17' of...

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@jadeSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 35f54179 40eb0dcf
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment