mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
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>
This commit is contained in:
parent
923bab365d
commit
5f05806319
1 changed files with 0 additions and 6 deletions
Loading…
Add table
Add a link
Reference in a new issue