public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang@huawei.com>
To: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: <mhiramat@kernel.org>, <daniel@iogearbox.net>,
	<tglx@linutronix.de>, <naveen.n.rao@linux.vnet.ibm.com>,
	<jbacik@fb.com>, <keescook@chromium.org>, <ast@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] error-injection: remove meaningless null pointer check before debugfs_remove_recursive
Date: Mon, 10 Sep 2018 15:48:40 +0800	[thread overview]
Message-ID: <5B9621D8.2030408@huawei.com> (raw)
In-Reply-To: <20180910072120.GB47768@gmail.com>

On 2018/9/10 15:21, Ingo Molnar wrote:
> * zhong jiang <zhongjiang@huawei.com> wrote:
>
>> debugfs_remove_recursive has taken the null pointer into account.
>> just remove the null check before debugfs_remove_recursive.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>>  kernel/fail_function.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/kernel/fail_function.c b/kernel/fail_function.c
>> index bc80a4e..17f75b5 100644
>> --- a/kernel/fail_function.c
>> +++ b/kernel/fail_function.c
>> @@ -173,8 +173,7 @@ static void fei_debugfs_remove_attr(struct fei_attr *attr)
>>  	struct dentry *dir;
>>  
>>  	dir = debugfs_lookup(attr->kp.symbol_name, fei_debugfs_dir);
>> -	if (dir)
>> -		debugfs_remove_recursive(dir);
>> +	debugfs_remove_recursive(dir);
>>  }
>>  
>>  static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs)
> Please Cc: such patches to lkml and akpm.
 Ok, will do.
> Thanks,
>
> 	Ingo
>
>



           reply	other threads:[~2018-09-10  7:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20180910072120.GB47768@gmail.com>]

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=5B9621D8.2030408@huawei.com \
    --to=zhongjiang@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jbacik@fb.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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