[PATCH] drm/amdgpu: Free resources of bo_list when idr_alloc fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Christian König<christian.koenig at amd.com>

Am 06.07.2017 um 04:52 schrieb zhoucm1:
> Reviewed-by: Chunming Zhou <david1.zhou at amd.com>
>
> On 2017å¹´07æ??06æ?¥ 06:27, Alex Xie wrote:
>> Signed-off-by: Alex Xie <AlexBin.Xie at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
>> index efa6903..dc87962 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
>> @@ -83,7 +83,7 @@ static int amdgpu_bo_list_create(struct 
>> amdgpu_device *adev,
>>       r = idr_alloc(&fpriv->bo_list_handles, list, 1, 0, GFP_KERNEL);
>>       mutex_unlock(&fpriv->bo_list_lock);
>>       if (r < 0) {
>> -        kfree(list);
>> +        amdgpu_bo_list_free(list);
>>           return r;
>>       }
>>       *id = r;
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux