RE: [PATCH] drm/qxl: add NULL check for bo->resource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Christian König [mailto:ckoenig.leichtzumerken@xxxxxxxxx]
> Sent: Thursday, July 8, 2021 1:47 PM
> When allocations fails that can be NULL now.
> 
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> Reported-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
> Tested-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>

Hi Christian

thanks, it worked.

Tested-by: Roberto Sassu <roberto.sassu@xxxxxxxxxx>

Roberto

HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Li Jian, Shi Yanli

> ---
>  drivers/gpu/drm/qxl/qxl_ttm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> index 19fd39d9a00c..37a1b6a6ad6d 100644
> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> @@ -127,7 +127,7 @@ static void qxl_bo_move_notify(struct
> ttm_buffer_object *bo,
>  	struct qxl_bo *qbo;
>  	struct qxl_device *qdev;
> 
> -	if (!qxl_ttm_bo_is_qxl_bo(bo))
> +	if (!qxl_ttm_bo_is_qxl_bo(bo) || !bo->resource)
>  		return;
>  	qbo = to_qxl_bo(bo);
>  	qdev = to_qxl(qbo->tbo.base.dev);
> --
> 2.25.1





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux