linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] error-injection: remove meaningless null pointer check before debugfs_remove_recursive
       [not found] ` <20180910072120.GB47768@gmail.com>
@ 2018-09-10  7:48   ` zhong jiang
  0 siblings, 0 replies; only message in thread
From: zhong jiang @ 2018-09-10  7:48 UTC (permalink / raw)
  To: Ingo Molnar, Andrew Morton
  Cc: mhiramat, daniel, tglx, naveen.n.rao, jbacik, keescook, ast, LKML

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
>
>



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-10  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1536398674-20868-1-git-send-email-zhongjiang@huawei.com>
     [not found] ` <20180910072120.GB47768@gmail.com>
2018-09-10  7:48   ` [PATCH] error-injection: remove meaningless null pointer check before debugfs_remove_recursive zhong jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).