soc: qcom: scm: Fix SCM device initialization

Ensure that the SCM device is set only if dma_set_mask()
occurs successfully.

Change-Id: I98d305dbee85313dc328ecf74aff3dfeea98f838
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres 2019-10-10 12:48:57 -07:00
commit 551d5dd108

View file

@ -595,11 +595,11 @@ static int qcom_scm_probe(struct platform_device *pdev)
return -ENODEV;
}
qcom_scm_dev = &pdev->dev;
#ifdef CONFIG_ARM64
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
#endif
if (!ret)
qcom_scm_dev = &pdev->dev;
return ret;
}