summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-06-30 14:23:37 +1000
committerDave Airlie <airlied@redhat.com>2021-06-30 14:24:06 +1000
commit4bac159e595d22d9acffdc7a3e5dfee193155d0c (patch)
treead4abfaeebefef83f7ff94c9c91ca3cbb922c96f
parentb322a50d17ede5cff6622040f345228afecdcc45 (diff)
parenteed75ce7c8260e0d5612ced4a88180ab991e207c (diff)
Merge tag 'drm-misc-next-fixes-2021-06-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
Short summary of fixes pull: * amdgpu: Fix test for allocation failures Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/YNQxVybBGdjLMUQJ@linux-uq9g
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c2
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);