On Fri, Jul 18, 2025 at 04:23:05PM -0500, Dan Carpenter wrote:
> The xe_vram_region_alloc() function returns NULL on error.  It never
> returns error pointers.  Update the error checking to match.
> 
> Fixes: 4b0a5f5ce784 ("drm/xe: Unify the initialization of VRAM regions")
> Signed-off-by: Dan Carpenter <dan.carpen...@linaro.org>
> ---
>  drivers/gpu/drm/xe/xe_tile.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
> index 0be0a5c57ef4..d49ba3401963 100644
> --- a/drivers/gpu/drm/xe/xe_tile.c
> +++ b/drivers/gpu/drm/xe/xe_tile.c
> @@ -120,8 +120,8 @@ int xe_tile_alloc_vram(struct xe_tile *tile)
>               return 0;
>  
>       vram = xe_vram_region_alloc(xe, tile->id, XE_PL_VRAM0 + tile->id);
> -     if (IS_ERR(vram))
> -             return PTR_ERR(vram);
> +     if (!vram)
> +             return -ENOMEM;

Indeed correct, from the drmm_kmalloc to the probe where it is consumed.

Reviewed-by: Rodrigo Vivi <rodrigo.v...@intel.com>

and pushed to drm-xe-next

>       tile->mem.vram = vram;
>  
>       return 0;
> -- 
> 2.47.2
> 

Reply via email to