Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2746533e authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa: fix potential NULL deference on SMMU



Fix potential NULL deference when SMMU is available.

Change-Id: I3454612cb8473e94ceb8163eca018d2489bff0c5
CRs-Fixed: 1052523
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 6beb213a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4525,7 +4525,7 @@ static int ipa_smmu_uc_cb_probe(struct device *dev)
	cb->dev = dev;
	cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
				cb->va_start, cb->va_size);
	if (IS_ERR(cb->mapping)) {
	if (IS_ERR_OR_NULL(cb->mapping)) {
		IPADBG("Fail to create mapping\n");
		/* assume this failure is because iommu driver is not ready */
		return -EPROBE_DEFER;
@@ -4628,7 +4628,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
	cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
					       cb->va_start,
					       cb->va_size);
	if (IS_ERR(cb->mapping)) {
	if (IS_ERR_OR_NULL(cb->mapping)) {
		IPADBG("Fail to create mapping\n");
		/* assume this failure is because iommu driver is not ready */
		return -EPROBE_DEFER;
+2 −2
Original line number Diff line number Diff line
@@ -4866,7 +4866,7 @@ static int ipa_smmu_uc_cb_probe(struct device *dev)
	cb->dev = dev;
	cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
			cb->va_start, cb->va_size);
	if (IS_ERR(cb->mapping)) {
	if (IS_ERR_OR_NULL(cb->mapping)) {
		IPADBG("Fail to create mapping\n");
		/* assume this failure is because iommu driver is not ready */
		return -EPROBE_DEFER;
@@ -4979,7 +4979,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
	cb->dev = dev;
	cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
					cb->va_start, cb->va_size);
	if (IS_ERR(cb->mapping)) {
	if (IS_ERR_OR_NULL(cb->mapping)) {
		IPADBG("Fail to create mapping\n");
		/* assume this failure is because iommu driver is not ready */
		return -EPROBE_DEFER;