]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm: Drop unneeded NULL check
authorRob Clark <robin.clark@oss.qualcomm.com>
Thu, 17 Jul 2025 15:12:01 +0000 (08:12 -0700)
committerRob Clark <robin.clark@oss.qualcomm.com>
Sat, 6 Sep 2025 16:04:41 +0000 (09:04 -0700)
This is always set in msm_gpu_init(), and can never be NULL.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/664431/

drivers/gpu/drm/msm/msm_iommu.c

index 76cdd5ea06a02eafa6f76e1c3fb03e0cdc7fd469..89cdda73711ae10cb5e25627541e2d662355a279 100644 (file)
@@ -776,7 +776,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);