All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Free resources of bo_list when idr_alloc fails
@ 2017-07-05 22:27 Alex Xie
       [not found] ` <1499293623-24544-1-git-send-email-AlexBin.Xie-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Xie @ 2017-07-05 22:27 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Xie

Signed-off-by: Alex Xie <AlexBin.Xie@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;
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Free resources of bo_list when idr_alloc fails
       [not found] ` <1499293623-24544-1-git-send-email-AlexBin.Xie-5C7GfCeVMHo@public.gmane.org>
@ 2017-07-06  2:52   ` zhoucm1
       [not found]     ` <595DA5FA.5020609-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: zhoucm1 @ 2017-07-06  2:52 UTC (permalink / raw)
  To: Alex Xie, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Reviewed-by: Chunming Zhou <david1.zhou@amd.com>

On 2017年07月06日 06:27, Alex Xie wrote:
> Signed-off-by: Alex Xie <AlexBin.Xie@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Free resources of bo_list when idr_alloc fails
       [not found]     ` <595DA5FA.5020609-5C7GfCeVMHo@public.gmane.org>
@ 2017-07-06  7:24       ` Christian König
  0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2017-07-06  7:24 UTC (permalink / raw)
  To: zhoucm1, Alex Xie, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

Am 06.07.2017 um 04:52 schrieb zhoucm1:
> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
>
> On 2017年07月06日 06:27, Alex Xie wrote:
>> Signed-off-by: Alex Xie <AlexBin.Xie@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-06  7:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-05 22:27 [PATCH] drm/amdgpu: Free resources of bo_list when idr_alloc fails Alex Xie
     [not found] ` <1499293623-24544-1-git-send-email-AlexBin.Xie-5C7GfCeVMHo@public.gmane.org>
2017-07-06  2:52   ` zhoucm1
     [not found]     ` <595DA5FA.5020609-5C7GfCeVMHo@public.gmane.org>
2017-07-06  7:24       ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.