Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b02c1536 authored by Bart Van Assche's avatar Bart Van Assche Committed by Doug Ledford
Browse files

IB/srp: Improve an error path



Avoid that the following message is printed if login fails:

scsi host0: ib_srp: Sending CM DREQ failed

Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Cc: Israel Rukshin <israelr@mellanox.com>
Cc: Max Gurtovoy <maxg@mellanox.com>
Cc: Laurence Oberman <loberman@redhat.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent a7139ca8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3440,7 +3440,7 @@ static ssize_t srp_create_target(struct device *dev,
					     target->ch_count,
					     ch->target->orig_dgid.raw);
				if (node_idx == 0 && cpu_idx == 0) {
					goto err_disconnect;
					goto free_ch;
				} else {
					srp_free_ch_ib(target, ch);
					srp_free_req_data(target, ch);
@@ -3487,6 +3487,7 @@ static ssize_t srp_create_target(struct device *dev,
err_disconnect:
	srp_disconnect_target(target);

free_ch:
	for (i = 0; i < target->ch_count; i++) {
		ch = &target->ch[i];
		srp_free_ch_ib(target, ch);