summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2026-01-29 12:02:10 +0300
committerArnd Bergmann <arnd@arndb.de>2026-01-29 12:02:11 +0300
commitc3cb2722e28969650c58d6defb09d57339a2a223 (patch)
tree2eae0d58a37c940ed7bb411d51041600538468ea
parent59e82a4237cf39be697f25f2da26f4bee3007826 (diff)
parentf2090ebdb59d0546cbd7b55d9dd63a77133efc03 (diff)
downloadlinux-c3cb2722e28969650c58d6defb09d57339a2a223.tar.xz
Merge tag 'qcom-drivers-fixes-for-6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes
Qualcomm driver fix for v6.19 The changes to the logic in the Qualcomm SMEM driver for separating "failed to probe" from "not yet probed", did not change the qcom_smem_is_available() function, with the result that clients sees SMEM as always available. Clients might then proceed to interact with SMEM in codepaths that aren't suited to cope with -EPROBE_DEFER. * tag 'qcom-drivers-fixes-for-6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: smem: fix qcom_smem_is_available and check if __smem is valid Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/soc/qcom/smem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index fef840b54574..c18a0c946f76 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -396,7 +396,7 @@ EXPORT_SYMBOL_GPL(qcom_smem_bust_hwspin_lock_by_host);
*/
bool qcom_smem_is_available(void)
{
- return !!__smem;
+ return !IS_ERR(__smem);
}
EXPORT_SYMBOL_GPL(qcom_smem_is_available);
@@ -1247,7 +1247,8 @@ static void qcom_smem_remove(struct platform_device *pdev)
{
platform_device_unregister(__smem->socinfo);
- __smem = NULL;
+ /* Set to -EPROBE_DEFER to signal unprobed state */
+ __smem = ERR_PTR(-EPROBE_DEFER);
}
static const struct of_device_id qcom_smem_of_match[] = {