(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

drm/xe/madvise: Remove unreachable madvise_funcs NULL check

The NULL check on madvise_funcs[attr_type] in xe_vm_madvise_ioctl() is unreachable. madvise_args_are_sane() already validates args->type via a switch statement whose default case rejects any type not present in madvise_funcs[]. Every type that passes the sanity check has a corresponding entry in the table. Beyond being dead code, the check's error path (goto err_fini) would also skip xe_svm_notifier_unlock() if it were somehow reached with has_svm_userptr_vmas set, since err_fini only tears down the drm_exec. Removing the check eliminates both the redundancy and the latent unwind hazard. No functional change. Assisted-by: LLM Reviewed-by: Xin Wang <x.wang@intel.com> Link: https://patch.msgid.link/20260915011229.203424-1-shuicheng.lin@intel.com Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>


Author Shuicheng Lin Date Commit Parent 923bab36
-6
1 changed file
-6
1 changed file