Messages in this thread | | | Date | Mon, 4 Jul 2022 18:13:40 +0200 | From | Greg Kroah-Hartman <> | Subject | Re: [PATCH] binder: fix redefinition of seq_file attributes |
| |
On Fri, Jul 01, 2022 at 06:20:41PM +0000, Carlos Llamas wrote: > + binder_for_each_debugfs_entry(db_entry) { > + dentry = binderfs_create_file(binder_logs_root_dir, > + db_entry->name, > + db_entry->fops, > + db_entry->data); > + if (IS_ERR(dentry)) { > + ret = PTR_ERR(dentry); > + goto out; > + }
I know this is a copy of what is there already, but there is never a need to check the result of a debugfs_create_* call. Just call it and move on, never "abort" based on the result of a debugfs call, that's not a good idea.
So can you change this here, or want to send a follow-on patch that removes these checks?
> } > > proc_log_dir = binderfs_create_dir(binder_logs_root_dir, "proc");
Also there's never a need to save a directory, you can always look it up when you want to remove it.
thanks,
greg k-h
| |