mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
drm/xe: Fix checking for unset value
Commit3743040261("drm/xe: NULL binding implementation") introduced the NULL binding implementation, but left a case in which the out value is_vram is not set and the caller will use whatever was on stack. Eventually the is_vram out could be removed, but this should at least fix the current bug. Fixes:3743040261("drm/xe: NULL binding implementation") Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230726160708.3967790-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
committed by
Rodrigo Vivi
parent
6aa26f6eb8
commit
0e34fdb4a0
@@ -81,8 +81,10 @@ u64 xe_pde_encode(struct xe_bo *bo, u64 bo_offset,
|
||||
static dma_addr_t vma_addr(struct xe_vma *vma, u64 offset,
|
||||
size_t page_size, bool *is_vram)
|
||||
{
|
||||
if (xe_vma_is_null(vma))
|
||||
if (xe_vma_is_null(vma)) {
|
||||
*is_vram = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (xe_vma_is_userptr(vma)) {
|
||||
struct xe_res_cursor cur;
|
||||
|
||||
Reference in New Issue
Block a user