diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_mcg.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mcg.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c index 77bc6c746f43..55ff5e5bcfef 100644 --- a/drivers/infiniband/hw/mthca/mthca_mcg.c +++ b/drivers/infiniband/hw/mthca/mthca_mcg.c | |||
@@ -154,10 +154,7 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
154 | return PTR_ERR(mailbox); | 154 | return PTR_ERR(mailbox); |
155 | mgm = mailbox->buf; | 155 | mgm = mailbox->buf; |
156 | 156 | ||
157 | if (down_interruptible(&dev->mcg_table.sem)) { | 157 | down(&dev->mcg_table.sem); |
158 | err = -EINTR; | ||
159 | goto err_sem; | ||
160 | } | ||
161 | 158 | ||
162 | err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); | 159 | err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); |
163 | if (err) | 160 | if (err) |
@@ -242,7 +239,7 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
242 | mthca_free(&dev->mcg_table.alloc, index); | 239 | mthca_free(&dev->mcg_table.alloc, index); |
243 | } | 240 | } |
244 | up(&dev->mcg_table.sem); | 241 | up(&dev->mcg_table.sem); |
245 | err_sem: | 242 | |
246 | mthca_free_mailbox(dev, mailbox); | 243 | mthca_free_mailbox(dev, mailbox); |
247 | return err; | 244 | return err; |
248 | } | 245 | } |
@@ -263,10 +260,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
263 | return PTR_ERR(mailbox); | 260 | return PTR_ERR(mailbox); |
264 | mgm = mailbox->buf; | 261 | mgm = mailbox->buf; |
265 | 262 | ||
266 | if (down_interruptible(&dev->mcg_table.sem)) { | 263 | down(&dev->mcg_table.sem); |
267 | err = -EINTR; | ||
268 | goto err_sem; | ||
269 | } | ||
270 | 264 | ||
271 | err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); | 265 | err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); |
272 | if (err) | 266 | if (err) |
@@ -372,7 +366,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
372 | 366 | ||
373 | out: | 367 | out: |
374 | up(&dev->mcg_table.sem); | 368 | up(&dev->mcg_table.sem); |
375 | err_sem: | 369 | |
376 | mthca_free_mailbox(dev, mailbox); | 370 | mthca_free_mailbox(dev, mailbox); |
377 | return err; | 371 | return err; |
378 | } | 372 | } |