aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/nodemgr.c')
-rw-r--r--drivers/ieee1394/nodemgr.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 11712a3ae0ad..ec8edd2f19de 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1112,7 +1112,7 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
1112{ 1112{
1113 unsigned int ud_id = 0; 1113 unsigned int ud_id = 0;
1114 struct csr1212_dentry *dentry; 1114 struct csr1212_dentry *dentry;
1115 struct csr1212_keyval *kv; 1115 struct csr1212_keyval *kv, *vendor_name_kv = NULL;
1116 u8 last_key_id = 0; 1116 u8 last_key_id = 0;
1117 1117
1118 ne->needs_probe = 0; 1118 ne->needs_probe = 0;
@@ -1139,8 +1139,8 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
1139 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 && 1139 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 &&
1140 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 && 1140 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 &&
1141 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) { 1141 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) {
1142 ne->vendor_name_kv = kv;
1143 csr1212_keep_keyval(kv); 1142 csr1212_keep_keyval(kv);
1143 vendor_name_kv = kv;
1144 } 1144 }
1145 } 1145 }
1146 break; 1146 break;
@@ -1149,10 +1149,13 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
1149 } 1149 }
1150 1150
1151 if (ne->vendor_name_kv) { 1151 if (ne->vendor_name_kv) {
1152 int error = device_create_file(&ne->device, 1152 kv = ne->vendor_name_kv;
1153 &dev_attr_ne_vendor_name_kv); 1153 ne->vendor_name_kv = vendor_name_kv;
1154 1154 csr1212_release_keyval(kv);
1155 if (error && error != -EEXIST) 1155 } else if (vendor_name_kv) {
1156 ne->vendor_name_kv = vendor_name_kv;
1157 if (device_create_file(&ne->device,
1158 &dev_attr_ne_vendor_name_kv) != 0)
1156 HPSB_ERR("Failed to add sysfs attribute"); 1159 HPSB_ERR("Failed to add sysfs attribute");
1157 } 1160 }
1158} 1161}