diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-08-27 22:05:48 -0700 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2018-09-13 16:11:39 -0500 |
commit | 137dc5843faeacabf48fc22a8dc58c4e0b4f0927 (patch) | |
tree | bdf799fef28e8ed9df81ab0337ccda05ca8b4e37 /drivers/soc | |
parent | 61a3bd10082b0e861b4e1bc451a92e20181a52f5 (diff) | |
download | linux-stable-137dc5843faeacabf48fc22a8dc58c4e0b4f0927.tar.gz linux-stable-137dc5843faeacabf48fc22a8dc58c4e0b4f0927.tar.bz2 linux-stable-137dc5843faeacabf48fc22a8dc58c4e0b4f0927.zip |
soc: qcom: rmtfs-mem: Validate that scm is available
The scm device must be present in order for the rmtfs driver to
configure memory permissions for the rmtfs memory region, so check that
it is probed before continuing.
Cc: stable@vger.kernel.org
Fixes: fa65f8045137 ("soc: qcom: rmtfs-mem: Add support for assigning memory to remote")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/rmtfs_mem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rmtfs_mem.c b/drivers/soc/qcom/rmtfs_mem.c index 8a3678c2e83c..97bb5989aa21 100644 --- a/drivers/soc/qcom/rmtfs_mem.c +++ b/drivers/soc/qcom/rmtfs_mem.c @@ -212,6 +212,11 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to parse qcom,vmid\n"); goto remove_cdev; } else if (!ret) { + if (!qcom_scm_is_available()) { + ret = -EPROBE_DEFER; + goto remove_cdev; + } + perms[0].vmid = QCOM_SCM_VMID_HLOS; perms[0].perm = QCOM_SCM_PERM_RW; perms[1].vmid = vmid; |