Unverified Commit c3cb2722 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'qcom-drivers-fixes-for-6.19' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 59e82a42 f2090ebd
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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[] = {