lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221109160708.507481-1-ludvig.parsson@axis.com>
Date:   Wed, 9 Nov 2022 17:07:08 +0100
From:   Ludvig Pärsson <ludvig.parsson@...s.com>
To:     Jens Wiklander <jens.wiklander@...aro.org>
CC:     <kernel@...s.com>,
        Ludvig Pärsson <ludvig.parsson@...s.com>,
        Sumit Garg <sumit.garg@...aro.org>,
        <op-tee@...ts.trustedfirmware.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] tee: optee: Populate child nodes in probe function

Currently there is no dependency between the "linaro,scmi-optee" driver
and the tee_core. If the scmi-optee driver gets probed before the
tee_bus_type is initialized, then we will get an unwanted error print.

This patch enables putting scmi-optee nodes as children to the optee
node in devicetree, which indirectly creates the missing dependency.

Signed-off-by: Ludvig Pärsson <ludvig.parsson@...s.com>
---
 drivers/tee/optee/smc_abi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index a1c1fa1a9c28..be6f02fd5a7f 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -1533,6 +1533,11 @@ static int optee_probe(struct platform_device *pdev)
 	if (rc)
 		goto err_disable_shm_cache;
 
+	/* Populate any dependent child node (if any) */
+	rc = devm_of_platform_populate(&pdev->dev);
+	if (rc)
+		goto err_disable_shm_cache;
+
 	pr_info("initialized driver\n");
 	return 0;
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ