<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Yongjun,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">This issue has been fixed<span class="op_dict_text2"></span>.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best Regards</p>
<p style="margin-top:0;margin-bottom:0">Rex<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>commit 51f1f6f51712aade68cabb145ed8bab4a6c3997e<br>
Author: Rex Zhu <Rex.Zhu@amd.com><br>
Date:   Fri Nov 23 18:52:21 2018 +0800<br>
<br>
    drm/amdgpu: Fix static checker warning<br>
    <br>
    drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c:49 amdgpu_allocate_static_csa()<br>
    error: uninitialized symbol 'ptr'.<br>
    <br>
    the test if (!bo) doesn't work, as the bo is a pointer to a pointer.<br>
    if bo create failed, the *bo will be set to NULL.<br>
    so change to test *bo.<br>
    <br>
    Reviewed-by: Christian König <christian.koenig@amd.com><br>
    Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
<br>
</div>
<br>
<p></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Wei Yongjun <weiyongjun1@huawei.com><br>
<b>Sent:</b> Tuesday, December 4, 2018 2:39 PM<br>
<b>To:</b> Deucher, Alexander; Koenig, Christian; Zhou, David(ChunMing); airlied@linux.ie; Zhu, Rex; Liu, Monk<br>
<b>Cc:</b> Wei Yongjun; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org<br>
<b>Subject:</b> [PATCH -next] drm/amdgpu: Fix return value check in amdgpu_allocate_static_csa()</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Fix the return value check which testing the wrong variable<br>
in amdgpu_allocate_static_csa().<br>
<br>
Fixes: 7946340fa389 ("drm/amdgpu: Move csa related code to separate file")<br>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c<br>
index 0c590dd..a5fbc6f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c<br>
@@ -43,7 +43,7 @@ int amdgpu_allocate_static_csa(struct amdgpu_device *adev, struct amdgpu_bo **bo<br>
         r = amdgpu_bo_create_kernel(adev, size, PAGE_SIZE,<br>
                                 domain, bo,<br>
                                 NULL, &ptr);<br>
-       if (!bo)<br>
+       if (!r)<br>
                 return -ENOMEM;<br>
 <br>
         memset(ptr, 0, size);<br>
<br>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>