Skip to contentSkip to conversation

drm/msm: Drop unneeded NULL check

PATCH In review Rob Clark 2 participants 2 messages Jul 17, 2025 – Aug 28, 2025

Subsystems (3)
lore
Share & tools
lore

Rob Clark

author maintainer
#0 lore raw

PATCH 1/1 drm/msm: Drop unneeded NULL check

This is always set in msm_gpu_init(), and can never be NULL.

---
 drivers/gpu/drm/msm/msm_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_iommu.c +1 -1
index 55c29f49b788..cefa50192391 100644
@@ -768,7 +768,7 @@ struct msm_mmu *msm_iommu_gpu_new(struct device *dev, struct msm_gpu *gpu, unsig
 		return mmu;
 
 	iommu = to_msm_iommu(mmu);
-	if (adreno_smmu && adreno_smmu->cookie) {
+	if (adreno_smmu->cookie) {
 		const struct io_pgtable_cfg *cfg =
 			adreno_smmu->get_ttbr1_cfg(adreno_smmu->cookie);
 		size_t tblsz = get_tblsz(cfg);
Signature · 1 line
2.50.1