iommu: Add NULL pointer check in iommu_present function
We call msm_iommu_bus_register only when legacy
msm iommu driver is enabled. If for some reason
the driver is disabled, we never register our
dummy bus msm_iommu_non_sec_bus_type. So, we might
end up with NULL pointer exception if clients try
to call iommu_present with this dummy bus.
Put a NULL pointer check to ensure we don't end
up crashing system if legacy driver is disabled.
Change-Id: I7122e3355459e5115d639a8c1aab547bf0fc7f6e
Signed-off-by:
Susheel Khiani <skhiani@codeaurora.org>
Loading
Please register or sign in to comment