|
@@ -3440,7 +3440,7 @@ static ssize_t srp_create_target(struct device *dev,
|
|
target->ch_count,
|
|
target->ch_count,
|
|
ch->target->orig_dgid.raw);
|
|
ch->target->orig_dgid.raw);
|
|
if (node_idx == 0 && cpu_idx == 0) {
|
|
if (node_idx == 0 && cpu_idx == 0) {
|
|
- goto err_disconnect;
|
|
|
|
|
|
+ goto free_ch;
|
|
} else {
|
|
} else {
|
|
srp_free_ch_ib(target, ch);
|
|
srp_free_ch_ib(target, ch);
|
|
srp_free_req_data(target, ch);
|
|
srp_free_req_data(target, ch);
|
|
@@ -3487,6 +3487,7 @@ put:
|
|
err_disconnect:
|
|
err_disconnect:
|
|
srp_disconnect_target(target);
|
|
srp_disconnect_target(target);
|
|
|
|
|
|
|
|
+free_ch:
|
|
for (i = 0; i < target->ch_count; i++) {
|
|
for (i = 0; i < target->ch_count; i++) {
|
|
ch = &target->ch[i];
|
|
ch = &target->ch[i];
|
|
srp_free_ch_ib(target, ch);
|
|
srp_free_ch_ib(target, ch);
|