msm: ipa: fix potential NULL deference on SMMU
Fix potential NULL deference when SMMU is available. Change-Id: I3454612cb8473e94ceb8163eca018d2489bff0c5 CRs-Fixed: 1052523 Acked-by: Ady Abraham <adya@qti.qualcomm.com> Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
parent
c5984ec85c
commit
ab8bdb44da
2 changed files with 4 additions and 4 deletions
|
@ -4440,7 +4440,7 @@ static int ipa_smmu_uc_cb_probe(struct device *dev)
|
||||||
cb->dev = dev;
|
cb->dev = dev;
|
||||||
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
||||||
cb->va_start, cb->va_size);
|
cb->va_start, cb->va_size);
|
||||||
if (IS_ERR(cb->mapping)) {
|
if (IS_ERR_OR_NULL(cb->mapping)) {
|
||||||
IPADBG("Fail to create mapping\n");
|
IPADBG("Fail to create mapping\n");
|
||||||
/* assume this failure is because iommu driver is not ready */
|
/* assume this failure is because iommu driver is not ready */
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
@ -4543,7 +4543,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
|
||||||
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
||||||
cb->va_start,
|
cb->va_start,
|
||||||
cb->va_size);
|
cb->va_size);
|
||||||
if (IS_ERR(cb->mapping)) {
|
if (IS_ERR_OR_NULL(cb->mapping)) {
|
||||||
IPADBG("Fail to create mapping\n");
|
IPADBG("Fail to create mapping\n");
|
||||||
/* assume this failure is because iommu driver is not ready */
|
/* assume this failure is because iommu driver is not ready */
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
|
@ -4752,7 +4752,7 @@ static int ipa_smmu_uc_cb_probe(struct device *dev)
|
||||||
cb->dev = dev;
|
cb->dev = dev;
|
||||||
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
||||||
cb->va_start, cb->va_size);
|
cb->va_start, cb->va_size);
|
||||||
if (IS_ERR(cb->mapping)) {
|
if (IS_ERR_OR_NULL(cb->mapping)) {
|
||||||
IPADBG("Fail to create mapping\n");
|
IPADBG("Fail to create mapping\n");
|
||||||
/* assume this failure is because iommu driver is not ready */
|
/* assume this failure is because iommu driver is not ready */
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
@ -4866,7 +4866,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
|
||||||
cb->dev = dev;
|
cb->dev = dev;
|
||||||
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
|
||||||
cb->va_start, cb->va_size);
|
cb->va_start, cb->va_size);
|
||||||
if (IS_ERR(cb->mapping)) {
|
if (IS_ERR_OR_NULL(cb->mapping)) {
|
||||||
IPADBG("Fail to create mapping\n");
|
IPADBG("Fail to create mapping\n");
|
||||||
/* assume this failure is because iommu driver is not ready */
|
/* assume this failure is because iommu driver is not ready */
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
Loading…
Add table
Reference in a new issue