mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
mips: kernel: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: Yangtao Li <tiny.windzz@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Mathieu Malaterre <malat@debian.org> Cc: Huacai Chen <chenhc@lemote.com> Cc: Marcin Nowakowski <marcin.nowakowski@mips.com> Cc: Yasha Cherikovsky <yasha.che3@gmail.com> Cc: linux-mips@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Burton <paul.burton@mips.com>
This commit is contained in:
parent
ef9d5a6a3f
commit
d8140426bc
5 changed files with 16 additions and 64 deletions
|
@ -95,18 +95,9 @@ static const struct file_operations segments_fops = {
|
|||
|
||||
static int __init segments_info(void)
|
||||
{
|
||||
struct dentry *segments;
|
||||
|
||||
if (cpu_has_segments) {
|
||||
if (!mips_debugfs_dir)
|
||||
return -ENODEV;
|
||||
|
||||
segments = debugfs_create_file("segments", S_IRUGO,
|
||||
mips_debugfs_dir, NULL,
|
||||
&segments_fops);
|
||||
if (!segments)
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (cpu_has_segments)
|
||||
debugfs_create_file("segments", S_IRUGO, mips_debugfs_dir, NULL,
|
||||
&segments_fops);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue