]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 23 Sep 2019 19:07:46 +0000 (21:07 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sun, 17 Nov 2019 14:37:00 +0000 (10:37 -0400)
We should jump to fail3 in order to undo the 'xa_insert_irq()' call.

Link: https://lore.kernel.org/r/20190923190746.10964-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/cxgb4/cm.c

index e87fc0408470452c4bc5600c127f69848c2c3cb3..81440eaf0a004b926625e9af07bb941168611fc9 100644 (file)
@@ -3381,7 +3381,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
                if (raddr->sin_addr.s_addr == htonl(INADDR_ANY)) {
                        err = pick_local_ipaddrs(dev, cm_id);
                        if (err)
-                               goto fail2;
+                               goto fail3;
                }
 
                /* find a route */
@@ -3403,7 +3403,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
                if (ipv6_addr_type(&raddr6->sin6_addr) == IPV6_ADDR_ANY) {
                        err = pick_local_ip6addrs(dev, cm_id);
                        if (err)
-                               goto fail2;
+                               goto fail3;
                }
 
                /* find a route */