All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Harry Wentland <harry.wentland-5C7GfCeVMHo@public.gmane.org>
Cc: David1.Zhou-5C7GfCeVMHo@public.gmane.org,
	Aric.Cyr-5C7GfCeVMHo@public.gmane.org,
	keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	sunpeng.li-5C7GfCeVMHo@public.gmane.org,
	Anthony.Koo-5C7GfCeVMHo@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	airlied-cv59FeDIM0c@public.gmane.org,
	alexander.deucher-5C7GfCeVMHo@public.gmane.org,
	Tony.Cheng-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH] drm/amd/display: remove redundant null pointer check before kfree
Date: Fri, 21 Sep 2018 22:10:21 +0800	[thread overview]
Message-ID: <5BA4FBCD.6080102@huawei.com> (raw)
In-Reply-To: <18ebd398-9eeb-54e7-96ff-19a1c34bdcd3-5C7GfCeVMHo@public.gmane.org>

On 2018/9/21 21:56, Harry Wentland wrote:
> On 2018-09-21 09:12 AM, zhong jiang wrote:
>> kfree has taken the null pointer into account. hence it is safe
>> to remove the redundant null pointer check before kfree.
>>
> Please send patches for drivers/gpu/drm/amd to amd-gfx@lists.freedesktop.org for review.
+cc amd-gfx@lists.freedesktop.org. Do I need to resend it ?

Sincerely,
zhong jiang
> Harry
>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>>  drivers/gpu/drm/amd/display/modules/stats/stats.c | 8 ++------
>>  1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/modules/stats/stats.c b/drivers/gpu/drm/amd/display/modules/stats/stats.c
>> index 3d4c1b1..03121ca 100644
>> --- a/drivers/gpu/drm/amd/display/modules/stats/stats.c
>> +++ b/drivers/gpu/drm/amd/display/modules/stats/stats.c
>> @@ -186,12 +186,8 @@ void mod_stats_destroy(struct mod_stats *mod_stats)
>>  	if (mod_stats != NULL) {
>>  		struct core_stats *core_stats = MOD_STATS_TO_CORE(mod_stats);
>>  
>> -		if (core_stats->time != NULL)
>> -			kfree(core_stats->time);
>> -
>> -		if (core_stats->events != NULL)
>> -			kfree(core_stats->events);
>> -
>> +		kfree(core_stats->time);
>> +		kfree(core_stats->events);
>>  		kfree(core_stats);
>>  	}
>>  }
>>
>


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

       reply	other threads:[~2018-09-21 14:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1537535531-45918-1-git-send-email-zhongjiang@huawei.com>
     [not found] ` <18ebd398-9eeb-54e7-96ff-19a1c34bdcd3@amd.com>
     [not found]   ` <18ebd398-9eeb-54e7-96ff-19a1c34bdcd3-5C7GfCeVMHo@public.gmane.org>
2018-09-21 14:10     ` zhong jiang [this message]
     [not found]       ` <5BA4FBCD.6080102-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-09-21 15:00         ` [PATCH] drm/amd/display: remove redundant null pointer check before kfree Harry Wentland
2019-10-30  1:57 zhong jiang
2019-10-30  1:57 ` zhong jiang
2019-10-30  1:57 ` zhong jiang
2019-10-30 13:36 ` Harry Wentland
2019-10-30 13:36   ` Harry Wentland
2019-10-30 13:56   ` Alex Deucher
2019-10-30 13:56     ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5BA4FBCD.6080102@huawei.com \
    --to=zhongjiang-hv44wf8li93qt0dzr+alfa@public.gmane.org \
    --cc=Anthony.Koo-5C7GfCeVMHo@public.gmane.org \
    --cc=Aric.Cyr-5C7GfCeVMHo@public.gmane.org \
    --cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \
    --cc=Tony.Cheng-5C7GfCeVMHo@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=sunpeng.li-5C7GfCeVMHo@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.