[AMD Official Use Only - Internal Distribution Only]

Series is:
Reviewed-by: Kevin Wang <[email protected]>

Best Regards,
Kevin

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, May 22, 2020 4:23 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/3] Revert "drm/amdgpu: off by one in 
amdgpu_device_attr_create_groups() error handling"

This reverts commit b41d9df2b680b96913cc3ccf929252e2dce71b24.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 2fc51f815eaa..72bbb8175b22 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1843,8 +1843,9 @@ static int amdgpu_device_attr_create_groups(struct 
amdgpu_device *adev,
         return 0;

 failed:
-       while (i--)
+       for (; i > 0; i--) {
                 amdgpu_device_attr_remove(adev, &attrs[i]);
+       }

         return ret;
 }
--
2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CLikun.Gao%40amd.com%7C6bb02ce265514761907d08d7fdc4ce0c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637256894700890419&amp;sdata=jiAa7VaiOak3oRjY4xd19fHlEnOWi%2Fed66AXfwVdGUo%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to