[PATCH -mm] kobject_add : kill unnecessary warning

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

 



Hi,
I don't know whether you or others have this change or not, if not please consider apply.

Kill the unnecessary warning in kobject_add if sysfs file EEXIST because of there's a similar one in sysfs_add_one

Signed-off-by: Dave Young <[email protected]> 

---
kobject.c |   13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)

diff -upr linux/lib/kobject.c linux.new/lib/kobject.c
--- linux/lib/kobject.c	2007-12-20 09:02:49.000000000 +0800
+++ linux.new/lib/kobject.c	2007-12-20 17:00:09.000000000 +0800
@@ -265,19 +265,10 @@ int kobject_add(struct kobject * kobj)
 
 	error = create_dir(kobj);
 	if (error) {
+		printk(KERN_ERR "kobject_add failed for %s (%d)\n",
+			       kobject_name(kobj), error);
 		/* unlink does the kobject_put() for us */
 		unlink(kobj);
-
-		/* be noisy on error issues */
-		if (error == -EEXIST)
-			printk(KERN_ERR "kobject_add failed for %s with "
-			       "-EEXIST, don't try to register things with "
-			       "the same name in the same directory.\n",
-			       kobject_name(kobj));
-		else
-			printk(KERN_ERR "kobject_add failed for %s (%d)\n",
-			       kobject_name(kobj), error);
-		dump_stack();
 	}
 
 	return error;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux