<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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 Dan,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>Thank you for your careful attention to the problem.</div>
<div>
<div></div>
<div>I made the mistake of this patch, when we do code rebase internally.</div>
<div><span style="font-size: 12pt;">and your patch is looks fine for me.</span><br>
</div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div>Reviewed-by: Kevin Wang <kevin1.wang@amd.com></div>
<div>Thanks.</div>
<div><br>
</div>
<div>Best Regards,</div>
<div>Kevin</div>
<div><br>
</div>
</div>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Dan Carpenter <dan.carpenter@oracle.com><br>
<b>Sent:</b> Thursday, March 21, 2019 2:28:22 PM<br>
<b>To:</b> Deucher, Alexander; Wang, Kevin(Yang)<br>
<b>Cc:</b> Koenig, Christian; Zhou, David(ChunMing); David Airlie; Daniel Vetter; Huang, Ray; Gao, Likun; Gui, Jack; amd-gfx@lists.freedesktop.org; kernel-janitors@vger.kernel.org<br>
<b>Subject:</b> [PATCH] drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">We already unlocked a few lines earlier so this code unlocks twice on<br>
the success path.<br>
<br>
Fixes: 5809d7420f97 ("drm/amd/powerplay: implement sysfs of pp_table for smu11 (v2)")<br>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com><br>
---<br>
I'm not sure what this bug looks like at runtime, but it's slightly<br>
weird that no one noticed. This is from static analysis and I haven't<br>
tested it myself.<br>
<br>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
index 00b7c885772b..7e8c74da6a74 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
@@ -187,6 +187,8 @@ int smu_sys_set_pp_table(struct smu_context *smu, void *buf, size_t size)<br>
if (ret)<br>
pr_info("smu reset failed, ret = %d\n", ret);<br>
<br>
+ return ret;<br>
+<br>
failed:<br>
mutex_unlock(&smu->mutex);<br>
return ret;<br>
-- <br>
2.17.1<br>
<br>
</div>
</span></font></div>
</body>
</html>