Re: [PATCH] drm/amdgpu: off by on in amdgpu_device_attr_create_groups() error handling

2020-05-20 Thread Dan Carpenter
On Wed, May 20, 2020 at 02:05:19PM +0200, Christian König wrote: > Am 20.05.20 um 14:00 schrieb Dan Carpenter: > > This loop in the error handling code should start a "i - 1" and end at > > "i == 0". Currently it starts a "i" and ends at "i == 1". The result > > is that it removes one attribute

Re: [PATCH] drm/amdgpu: off by on in amdgpu_device_attr_create_groups() error handling

2020-05-20 Thread Christian König
Am 20.05.20 um 14:00 schrieb Dan Carpenter: This loop in the error handling code should start a "i - 1" and end at "i == 0". Currently it starts a "i" and ends at "i == 1". The result is that it removes one attribute that wasn't created yet, and leaks the zeroeth attribute. Fixes:

[PATCH] drm/amdgpu: off by on in amdgpu_device_attr_create_groups() error handling

2020-05-20 Thread Dan Carpenter
This loop in the error handling code should start a "i - 1" and end at "i == 0". Currently it starts a "i" and ends at "i == 1". The result is that it removes one attribute that wasn't created yet, and leaks the zeroeth attribute. Fixes: 4e01847c38f7 ("drm/amdgpu: optimize amdgpu device