linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/amdgpu: Fix return value check in amdgpu_allocate_static_csa()
@ 2018-12-04  6:39 Wei Yongjun
  2018-12-04  6:39 ` zhoucm1
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2018-12-04  6:39 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	Rex.Zhu, Monk.Liu
  Cc: Wei Yongjun, amd-gfx, dri-devel, linux-kernel, kernel-janitors

Fix the return value check which testing the wrong variable
in amdgpu_allocate_static_csa().

Fixes: 7946340fa389 ("drm/amdgpu: Move csa related code to separate file")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
index 0c590dd..a5fbc6f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
@@ -43,7 +43,7 @@ int amdgpu_allocate_static_csa(struct amdgpu_device *adev, struct amdgpu_bo **bo
 	r = amdgpu_bo_create_kernel(adev, size, PAGE_SIZE,
 				domain, bo,
 				NULL, &ptr);
-	if (!bo)
+	if (!r)
 		return -ENOMEM;
 
 	memset(ptr, 0, size);




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-04  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04  6:39 [PATCH -next] drm/amdgpu: Fix return value check in amdgpu_allocate_static_csa() Wei Yongjun
2018-12-04  6:39 ` zhoucm1

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).