]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blobdiff - drivers/infiniband/ulp/ipoib/ipoib_cm.c
sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched...
[mirror_ubuntu-disco-kernel.git] / drivers / infiniband / ulp / ipoib / ipoib_cm.c
index 53d69d7d9ad480d28881517a7a7f80690239f575..0cdf2b7f272f3a5dfbbd4479b85a0079b2e99017 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/moduleparam.h>
+#include <linux/sched/signal.h>
 
 #include "ipoib.h"
 
@@ -363,7 +364,7 @@ static int ipoib_cm_nonsrq_init_rx(struct net_device *dev, struct ib_cm_id *cm_i
        t = kmalloc(sizeof *t, GFP_KERNEL);
        if (!t) {
                ret = -ENOMEM;
-               goto err_free;
+               goto err_free_1;
        }
 
        ipoib_cm_init_rx_wr(dev, &t->wr, t->sge);
@@ -410,6 +411,8 @@ err_count:
 
 err_free:
        kfree(t);
+
+err_free_1:
        ipoib_cm_free_rx_ring(dev, rx->rx_ring);
 
        return ret;
@@ -1155,13 +1158,13 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
        ret = ipoib_cm_modify_tx_init(p->dev, p->id,  p->qp);
        if (ret) {
                ipoib_warn(priv, "failed to modify tx qp to rtr: %d\n", ret);
-               goto err_modify;
+               goto err_modify_send;
        }
 
        ret = ipoib_cm_send_req(p->dev, p->id, p->qp, qpn, pathrec);
        if (ret) {
                ipoib_warn(priv, "failed to send cm req: %d\n", ret);
-               goto err_send_cm;
+               goto err_modify_send;
        }
 
        ipoib_dbg(priv, "Request connection 0x%x for gid %pI6 qpn 0x%x\n",
@@ -1169,8 +1172,7 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
 
        return 0;
 
-err_send_cm:
-err_modify:
+err_modify_send:
        ib_destroy_cm_id(p->id);
 err_id:
        p->id = NULL;