Merge "msm: ipa: fix potential NULL deference on SMMU"

This commit is contained in:
Linux Build Service Account 2016-08-18 12:04:10 -07:00 committed by Gerrit - the friendly Code Review server
commit 5d7006369d
2 changed files with 4 additions and 4 deletions
drivers/platform/msm/ipa
ipa_v2
ipa_v3

View file

@ -4440,7 +4440,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;
@ -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->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;

View file

@ -4752,7 +4752,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;
@ -4866,7 +4866,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;