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

Commit 6086793a authored by Naseer Ahmed's avatar Naseer Ahmed
Browse files

msm: mdss: Fix potential NULL pointer dereference in mdss smmu driver



FB driver will call this function even if there is no MDP.
mdss_mdp_get_mdata will return NULL in that scenario and needs to be
checked.

Change-Id: Icebed1bc9b4da214fec2ca924590403d1656fa5d
Signed-off-by: default avatarNaseer Ahmed <naseer@codeaurora.org>
parent d3e41c96
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ static inline void mdss_smmu_dma_free_coherent(struct device *dev, size_t size,
		void *cpu_addr, dma_addr_t phys, dma_addr_t iova, int domain)
{
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	if (mdata->smmu_ops.smmu_dma_free_coherent)
	if (mdata && mdata->smmu_ops.smmu_dma_free_coherent)
		mdata->smmu_ops.smmu_dma_free_coherent(dev, size, cpu_addr,
			phys, iova, domain);
}