drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The "ticket" pointer points to in the middle of the &exec struct so it
can't be NULL. Remove the check.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index b0e8098a3988..7505d920fb3d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -631,7 +631,7 @@ amdgpu_userq_validate_bos(struct amdgpu_userq_mgr *uq_mgr)
clear = false;
unlock = true;
/* The caller is already holding the reservation lock */
- } else if (ticket && dma_resv_locking_ctx(resv) == ticket) {
+ } else if (dma_resv_locking_ctx(resv) == ticket) {
clear = false;
unlock = false;
/* Somebody else is using the BO right now */
--
2.47.2
On Wed, Apr 30, 2025 at 4:13 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> The "ticket" pointer points to in the middle of the &exec struct so it
> can't be NULL. Remove the check.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Applied. Thanks!
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index b0e8098a3988..7505d920fb3d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> @@ -631,7 +631,7 @@ amdgpu_userq_validate_bos(struct amdgpu_userq_mgr *uq_mgr)
> clear = false;
> unlock = true;
> /* The caller is already holding the reservation lock */
> - } else if (ticket && dma_resv_locking_ctx(resv) == ticket) {
> + } else if (dma_resv_locking_ctx(resv) == ticket) {
> clear = false;
> unlock = false;
> /* Somebody else is using the BO right now */
> --
> 2.47.2
>
On 4/30/25 10:05, Dan Carpenter wrote:
> The "ticket" pointer points to in the middle of the &exec struct so it
> can't be NULL. Remove the check.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index b0e8098a3988..7505d920fb3d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> @@ -631,7 +631,7 @@ amdgpu_userq_validate_bos(struct amdgpu_userq_mgr *uq_mgr)
> clear = false;
> unlock = true;
> /* The caller is already holding the reservation lock */
> - } else if (ticket && dma_resv_locking_ctx(resv) == ticket) {
> + } else if (dma_resv_locking_ctx(resv) == ticket) {
> clear = false;
> unlock = false;
> /* Somebody else is using the BO right now */
© 2016 - 2026 Red Hat, Inc.