mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <slava@dubeyko.com>
To: mdshahid@gmail.com,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	 Yangtao Li <frank.li@vivo.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: hfsplus: remove redundant NULL check before kfree()
Date: Fri, 24 Jul 2026 11:09:50 -0700	[thread overview]
Message-ID: <d97c34b070c97ec3da636c5b73f0c54c9b93ae3b.camel@dubeyko.com> (raw)
In-Reply-To: <CACRLeC5agyqVnvjdziV5C_Z+y6NPvXg1Nyv2g_mmK2D1QbsfYQ@mail.gmail.com>

On Fri, 2026-07-24 at 12:51 +0530, md shahid wrote:
> Hi,
> 
> Gentle ping on this patch.
> 
> Could someone please review it when time permits?

Sorry, I've missed this patch because of "fs: hfsplus" title.

> 
> Thanks!
> Shahid.
> 
> On Fri, Jul 3, 2026 at 3:53 PM <mdshahid03@gmail.com> wrote:
> > From: Mohammad Shahid <mdshahid03@gmail.com>
> > 
> > kfree() safely handles NULL pointers, so the explicit NULL check
> > before calling kfree() is unnecessary.
> > 
> > This issue was reported by ifnullfree.cocci.
> > 
> > Signed-off-by: Mohammad Shahid <mdshahid03@gmail.com>
> > ---
> >  fs/hfsplus/unicode_test.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/fs/hfsplus/unicode_test.c b/fs/hfsplus/unicode_test.c
> > index 83737c9bafa0..7f6b2a3c69d9 100644
> > --- a/fs/hfsplus/unicode_test.c
> > +++ b/fs/hfsplus/unicode_test.c
> > @@ -39,8 +39,7 @@ static struct test_mock_string_env
> > *setup_mock_str_env(u32 buf_size)
> > 
> >  static void free_mock_str_env(struct test_mock_string_env *env)
> >  {
> > -       if (env->buf)
> > -               kfree(env->buf);
> > +       kfree(env->buf);
> >         kfree(env);
> >  }
> > 

Makes sense.

Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>

Thanks,
Slava.

      parent reply	other threads:[~2026-07-24 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03 10:22 mdshahid03
2026-07-24 12:40 ` mdshahid03
2026-07-24 18:17   ` Viacheslav Dubeyko
2026-07-26  6:36     ` mdshahid03
2026-07-26  6:42       ` mdshahid03
2026-07-28  0:59         ` Viacheslav Dubeyko
2026-07-28  1:57           ` Viacheslav Dubeyko
     [not found] ` <CACRLeC5agyqVnvjdziV5C_Z+y6NPvXg1Nyv2g_mmK2D1QbsfYQ@mail.gmail.com>
2026-07-24 18:09   ` Viacheslav Dubeyko [this message]

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=d97c34b070c97ec3da636c5b73f0c54c9b93ae3b.camel@dubeyko.com \
    --to=slava@dubeyko.com \
    --cc=frank.li@vivo.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdshahid@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®