Selaa lähdekoodia

ieee1394: nodemgr: less noise in dmesg

Everytime when eth1394 or a libraw1394 client updates the configuration
ROM, a certain sysfs attribute cannot be added since it already exists.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter 18 vuotta sitten
vanhempi
commit
9324547235
1 muutettua tiedostoa jossa 8 lisäystä ja 7 poistoa
  1. 8 7
      drivers/ieee1394/nodemgr.c

+ 8 - 7
drivers/ieee1394/nodemgr.c

@@ -1145,13 +1145,14 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
 		last_key_id = kv->key.id;
 	}
 
-	if (ne->vendor_name_kv &&
-	    device_create_file(&ne->device, &dev_attr_ne_vendor_name_kv))
-		goto fail;
-	return;
-fail:
-	HPSB_ERR("Failed to add sysfs attribute for node %016Lx",
-		 (unsigned long long)ne->guid);
+	if (ne->vendor_name_kv) {
+		int error = device_create_file(&ne->device,
+					       &dev_attr_ne_vendor_name_kv);
+
+		if (error && error != -EEXIST)
+			HPSB_ERR("Failed to add sysfs attribute for node "
+				 "%016Lx", (unsigned long long)ne->guid);
+	}
 }
 
 #ifdef CONFIG_HOTPLUG