All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Yang Li <abaci-bugfix@linux.alibaba.com>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org,
	dyoung@redhat.com, adobriyan@gmail.com, vgoyal@redhat.com
Subject: Re: [PATCH] vmalloc: remove redundant NULL check
Date: Thu, 21 Jan 2021 16:23:56 +0800	[thread overview]
Message-ID: <20210121082356.GH20161@MiWiFi-R3L-srv> (raw)
In-Reply-To: <1611216753-44598-1-git-send-email-abaci-bugfix@linux.alibaba.com>

On 01/21/21 at 04:12pm, Yang Li wrote:
> Fix below warnings reported by coccicheck:
> ./fs/proc/vmcore.c:1503:2-7: WARNING: NULL check before some freeing
> functions is not needed.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
> ---
>  fs/proc/vmcore.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
> index c3a345c..9a15334 100644
> --- a/fs/proc/vmcore.c
> +++ b/fs/proc/vmcore.c
> @@ -1503,11 +1503,8 @@ int vmcore_add_device_dump(struct vmcoredd_data *data)
>  	return 0;
>  
>  out_err:
> -	if (buf)
> -		vfree(buf);
> -
> -	if (dump)
> -		vfree(dump);
> +	vfree(buf);
> +	vfree(dump);

Looks good, thx.

Acked-by: Baoquan He <bhe@redhat.com>

Thanks
Baoquan


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Baoquan He <bhe@redhat.com>
To: Yang Li <abaci-bugfix@linux.alibaba.com>
Cc: dyoung@redhat.com, vgoyal@redhat.com, adobriyan@gmail.com,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] vmalloc: remove redundant NULL check
Date: Thu, 21 Jan 2021 16:23:56 +0800	[thread overview]
Message-ID: <20210121082356.GH20161@MiWiFi-R3L-srv> (raw)
In-Reply-To: <1611216753-44598-1-git-send-email-abaci-bugfix@linux.alibaba.com>

On 01/21/21 at 04:12pm, Yang Li wrote:
> Fix below warnings reported by coccicheck:
> ./fs/proc/vmcore.c:1503:2-7: WARNING: NULL check before some freeing
> functions is not needed.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
> ---
>  fs/proc/vmcore.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
> index c3a345c..9a15334 100644
> --- a/fs/proc/vmcore.c
> +++ b/fs/proc/vmcore.c
> @@ -1503,11 +1503,8 @@ int vmcore_add_device_dump(struct vmcoredd_data *data)
>  	return 0;
>  
>  out_err:
> -	if (buf)
> -		vfree(buf);
> -
> -	if (dump)
> -		vfree(dump);
> +	vfree(buf);
> +	vfree(dump);

Looks good, thx.

Acked-by: Baoquan He <bhe@redhat.com>

Thanks
Baoquan


  reply	other threads:[~2021-01-21  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  8:12 [PATCH] vmalloc: remove redundant NULL check Yang Li
2021-01-21  8:12 ` Yang Li
2021-01-21  8:23 ` Baoquan He [this message]
2021-01-21  8:23   ` Baoquan He

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=20210121082356.GH20161@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=abaci-bugfix@linux.alibaba.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vgoyal@redhat.com \
    /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.