Skip to content

Commit c3cb272

Browse files
committed
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 <[email protected]>
2 parents 59e82a4 + f2090eb commit c3cb272

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/soc/qcom/smem.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ EXPORT_SYMBOL_GPL(qcom_smem_bust_hwspin_lock_by_host);
396396
*/
397397
bool qcom_smem_is_available(void)
398398
{
399-
return !!__smem;
399+
return !IS_ERR(__smem);
400400
}
401401
EXPORT_SYMBOL_GPL(qcom_smem_is_available);
402402

@@ -1247,7 +1247,8 @@ static void qcom_smem_remove(struct platform_device *pdev)
12471247
{
12481248
platform_device_unregister(__smem->socinfo);
12491249

1250-
__smem = NULL;
1250+
/* Set to -EPROBE_DEFER to signal unprobed state */
1251+
__smem = ERR_PTR(-EPROBE_DEFER);
12511252
}
12521253

12531254
static const struct of_device_id qcom_smem_of_match[] = {

0 commit comments

Comments
 (0)