Commit 40eb0dcf authored by Yang Yingliang's avatar Yang Yingliang Committed by Jens Wiklander
Browse files

tee: optee: fix error return code in probe function



If teedev_open() fails, probe function need return
error code.

Fixes: aceeafef ("optee: use driver internal tee_context for some rpc")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
parent aceeafef
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -860,8 +860,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)
+3 −1
Original line number Diff line number Diff line
@@ -1427,8 +1427,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)