[PATCH 2/3] drm/xe/vf: Remove lmtt->ops null check in xe_lmtt_estimate_pt_size
Himal Prasad Ghimiray
himal.prasad.ghimiray at intel.com
Fri Mar 8 04:36:50 UTC 2024
In xe_lmtt_estimate_pt_size: Pointer is checked against null but then
dereferenced anyway. Since xe_lmtt_init ensures lmtt->ops is populated
remove the check.
Reported by static analyzer.
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
---
drivers/gpu/drm/xe/xe_lmtt.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_lmtt.c b/drivers/gpu/drm/xe/xe_lmtt.c
index 0d7c5514e092..d6d75414bb99 100644
--- a/drivers/gpu/drm/xe/xe_lmtt.c
+++ b/drivers/gpu/drm/xe/xe_lmtt.c
@@ -487,7 +487,6 @@ u64 xe_lmtt_estimate_pt_size(struct xe_lmtt *lmtt, u64 size)
lmtt_assert(lmtt, IS_SRIOV_PF(lmtt_to_xe(lmtt)));
lmtt_assert(lmtt, IS_DGFX(lmtt_to_xe(lmtt)));
- lmtt_assert(lmtt, lmtt->ops);
pt_size = PAGE_ALIGN(lmtt->ops->lmtt_pte_size(level) *
lmtt->ops->lmtt_pte_num(level));
--
2.25.1
More information about the Intel-xe
mailing list