aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-13 19:28:36 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-04-29 18:00:29 -0400
commit511f7b3227eef52b56cf336a5313d8ff766c3050 (patch)
treee0120700d57ee5540857a7e05ee6a5a00151b347
parentc94ccf9e3389ff55078a049bfe59b82f854436e8 (diff)
ieee1394: csr1212: more sensible names for jump targets
Code beneath two labels called "fail" is actually also reached in case of success. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r--drivers/ieee1394/csr1212.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c
index 3c044fc52352..43f5b7f814ae 100644
--- a/drivers/ieee1394/csr1212.c
+++ b/drivers/ieee1394/csr1212.c
@@ -1138,7 +1138,7 @@ csr1212_parse_dir_entry(struct csr1212_keyval *dir, u32 ki, u32 kv_pos)
1138 CSR1212_KV_VAL(ki)); 1138 CSR1212_KV_VAL(ki));
1139 if (!k) { 1139 if (!k) {
1140 ret = -ENOMEM; 1140 ret = -ENOMEM;
1141 goto fail; 1141 goto out;
1142 } 1142 }
1143 1143
1144 k->refcnt = 0; /* Don't keep local reference when parsing. */ 1144 k->refcnt = 0; /* Don't keep local reference when parsing. */
@@ -1149,7 +1149,7 @@ csr1212_parse_dir_entry(struct csr1212_keyval *dir, u32 ki, u32 kv_pos)
1149 CSR1212_KV_VAL(ki)); 1149 CSR1212_KV_VAL(ki));
1150 if (!k) { 1150 if (!k) {
1151 ret = -ENOMEM; 1151 ret = -ENOMEM;
1152 goto fail; 1152 goto out;
1153 } 1153 }
1154 k->refcnt = 0; /* Don't keep local reference when parsing. */ 1154 k->refcnt = 0; /* Don't keep local reference when parsing. */
1155 break; 1155 break;
@@ -1162,7 +1162,7 @@ csr1212_parse_dir_entry(struct csr1212_keyval *dir, u32 ki, u32 kv_pos)
1162 * or Directories. The Config ROM image is most likely 1162 * or Directories. The Config ROM image is most likely
1163 * messed up, so we'll just abort here. */ 1163 * messed up, so we'll just abort here. */
1164 ret = -EIO; 1164 ret = -EIO;
1165 goto fail; 1165 goto out;
1166 } 1166 }
1167 1167
1168 k = csr1212_find_keyval_offset(dir, offset); 1168 k = csr1212_find_keyval_offset(dir, offset);
@@ -1177,7 +1177,7 @@ csr1212_parse_dir_entry(struct csr1212_keyval *dir, u32 ki, u32 kv_pos)
1177 1177
1178 if (!k) { 1178 if (!k) {
1179 ret = -ENOMEM; 1179 ret = -ENOMEM;
1180 goto fail; 1180 goto out;
1181 } 1181 }
1182 k->refcnt = 0; /* Don't keep local reference when parsing. */ 1182 k->refcnt = 0; /* Don't keep local reference when parsing. */
1183 k->valid = 0; /* Contents not read yet so it's not valid. */ 1183 k->valid = 0; /* Contents not read yet so it's not valid. */
@@ -1189,8 +1189,7 @@ csr1212_parse_dir_entry(struct csr1212_keyval *dir, u32 ki, u32 kv_pos)
1189 dir->next = k; 1189 dir->next = k;
1190 } 1190 }
1191 ret = csr1212_attach_keyval_to_directory(dir, k); 1191 ret = csr1212_attach_keyval_to_directory(dir, k);
1192 1192out:
1193fail:
1194 if (ret != CSR1212_SUCCESS && k != NULL) 1193 if (ret != CSR1212_SUCCESS && k != NULL)
1195 free_keyval(k); 1194 free_keyval(k);
1196 return ret; 1195 return ret;
@@ -1214,7 +1213,7 @@ int csr1212_parse_keyval(struct csr1212_keyval *kv,
1214 if ((csr1212_crc16(kvi->data, kvi_len) != kvi->crc) && 1213 if ((csr1212_crc16(kvi->data, kvi_len) != kvi->crc) &&
1215 (csr1212_msft_crc16(kvi->data, kvi_len) != kvi->crc)) { 1214 (csr1212_msft_crc16(kvi->data, kvi_len) != kvi->crc)) {
1216 ret = -EINVAL; 1215 ret = -EINVAL;
1217 goto fail; 1216 goto out;
1218 } 1217 }
1219#endif 1218#endif
1220 1219
@@ -1241,7 +1240,7 @@ int csr1212_parse_keyval(struct csr1212_keyval *kv,
1241 kv->value.leaf.data = CSR1212_MALLOC(size); 1240 kv->value.leaf.data = CSR1212_MALLOC(size);
1242 if (!kv->value.leaf.data) { 1241 if (!kv->value.leaf.data) {
1243 ret = -ENOMEM; 1242 ret = -ENOMEM;
1244 goto fail; 1243 goto out;
1245 } 1244 }
1246 1245
1247 kv->value.leaf.len = kvi_len; 1246 kv->value.leaf.len = kvi_len;
@@ -1251,8 +1250,7 @@ int csr1212_parse_keyval(struct csr1212_keyval *kv,
1251 } 1250 }
1252 1251
1253 kv->valid = 1; 1252 kv->valid = 1;
1254 1253out:
1255fail:
1256 return ret; 1254 return ret;
1257} 1255}
1258 1256