[merged] lib-debugobjects-no-need-to-check-return-value-of-debugfs_create-functions.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib: debugobjects: no need to check return value of debugfs_create functions
has been removed from the -mm tree.  Its filename was
     lib-debugobjects-no-need-to-check-return-value-of-debugfs_create-functions.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: lib: debugobjects: 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.

Link: http://lkml.kernel.org/r/20190612153513.GA21082@xxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Reviewed-by: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx>
Cc: Qian Cai <cai@xxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Waiman Long <longman@xxxxxxxxxx>
Cc: Zhong Jiang <zhongjiang@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/debugobjects.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

--- a/lib/debugobjects.c~lib-debugobjects-no-need-to-check-return-value-of-debugfs_create-functions
+++ a/lib/debugobjects.c
@@ -868,26 +868,16 @@ static const struct file_operations debu
 
 static int __init debug_objects_init_debugfs(void)
 {
-	struct dentry *dbgdir, *dbgstats;
+	struct dentry *dbgdir;
 
 	if (!debug_objects_enabled)
 		return 0;
 
 	dbgdir = debugfs_create_dir("debug_objects", NULL);
-	if (!dbgdir)
-		return -ENOMEM;
 
-	dbgstats = debugfs_create_file("stats", 0444, dbgdir, NULL,
-				       &debug_stats_fops);
-	if (!dbgstats)
-		goto err;
+	debugfs_create_file("stats", 0444, dbgdir, NULL, &debug_stats_fops);
 
 	return 0;
-
-err:
-	debugfs_remove(dbgdir);
-
-	return -ENOMEM;
 }
 __initcall(debug_objects_init_debugfs);
 
_

Patches currently in -mm which might be from gregkh@xxxxxxxxxxxxxxxxxxx are

ocfs-no-need-to-check-return-value-of-debugfs_create-functions.patch
ocfs-no-need-to-check-return-value-of-debugfs_create-functions-v2.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux