[PATCH] drm/xe: xe_svm_range_alloc should return NULL upon error

Matthew Brost matthew.brost at intel.com
Tue Apr 22 15:18:07 UTC 2025


On Tue, Apr 22, 2025 at 08:06:06AM +0300, Dafna Hirschfeld wrote:
> replace error pointer with NULL upon failure.
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld at intel.com>

This was already fixed here [1] but I guess I forget to merge it as
submitted externally. I'm going to merge the external series today.

Matt

[1] https://patchwork.freedesktop.org/series/146665/

> ---
>  drivers/gpu/drm/xe/xe_svm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
> index c7424c824a14..d927f50f2a68 100644
> --- a/drivers/gpu/drm/xe/xe_svm.c
> +++ b/drivers/gpu/drm/xe/xe_svm.c
> @@ -80,7 +80,7 @@ xe_svm_range_alloc(struct drm_gpusvm *gpusvm)
>  
>  	range = kzalloc(sizeof(*range), GFP_KERNEL);
>  	if (!range)
> -		return ERR_PTR(-ENOMEM);
> +		return NULL;
>  
>  	INIT_LIST_HEAD(&range->garbage_collector_link);
>  	xe_vm_get(gpusvm_to_vm(gpusvm));
> -- 
> 2.34.1
> 


More information about the Intel-xe mailing list