diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-06-18 11:37:21 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-06-21 15:24:29 +0200 |
commit | eed75ce7c8260e0d5612ced4a88180ab991e207c (patch) | |
tree | 291aac09befaa84c57c6b96d47e50d91e1b57463 | |
parent | 24ff3dc18b99c4b912ab1746e803ddb3be5ced4c (diff) |
drm/amdgpu: fix amdgpu_preempt_mgr_new()drm-misc-next-fixes-2021-06-24
There is a reversed if statement in amdgpu_preempt_mgr_new() so it
always returns -ENOMEM.
Fixes: 09b020bb05a5 ("Merge tag 'drm-misc-next-2021-06-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/YMxbQXg/Wqm0ACxt@mwanda
Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c index f6aff7ce5160..d02c8637f909 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c @@ -71,7 +71,7 @@ static int amdgpu_preempt_mgr_new(struct ttm_resource_manager *man, struct amdgpu_preempt_mgr *mgr = to_preempt_mgr(man); *res = kzalloc(sizeof(**res), GFP_KERNEL); - if (*res) + if (!*res) return -ENOMEM; ttm_resource_init(tbo, place, *res); |