Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -2
+3 -2
drivers/soc/qcom/smem.c
··· 396 396 */ 397 397 bool qcom_smem_is_available(void) 398 398 { 399 - return !!__smem; 399 + return !IS_ERR(__smem); 400 400 } 401 401 EXPORT_SYMBOL_GPL(qcom_smem_is_available); 402 402 ··· 1247 1247 { 1248 1248 platform_device_unregister(__smem->socinfo); 1249 1249 1250 - __smem = NULL; 1250 + /* Set to -EPROBE_DEFER to signal unprobed state */ 1251 + __smem = ERR_PTR(-EPROBE_DEFER); 1251 1252 } 1252 1253 1253 1254 static const struct of_device_id qcom_smem_of_match[] = {