]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - lib/kobject.c
kobject: don't use WARN for registration failures
[mirror_ubuntu-bionic-kernel.git] / lib / kobject.c
index 763d70a189410cb7307b87474801a662f631f806..34f847252c02116abe3551c78502be24d97d3ac9 100644 (file)
@@ -234,14 +234,12 @@ static int kobject_add_internal(struct kobject *kobj)
 
                /* be noisy on error issues */
                if (error == -EEXIST)
-                       WARN(1, "%s failed for %s with "
-                            "-EEXIST, don't try to register things with "
-                            "the same name in the same directory.\n",
-                            __func__, kobject_name(kobj));
+                       pr_err("%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n",
+                              __func__, kobject_name(kobj));
                else
-                       WARN(1, "%s failed for %s (error: %d parent: %s)\n",
-                            __func__, kobject_name(kobj), error,
-                            parent ? kobject_name(parent) : "'none'");
+                       pr_err("%s failed for %s (error: %d parent: %s)\n",
+                              __func__, kobject_name(kobj), error,
+                              parent ? kobject_name(parent) : "'none'");
        } else
                kobj->state_in_sysfs = 1;