Skip to content

Commit

Permalink
Merge branches 'cma', 'mlx4' and 'qib' into for-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland Dreier committed Dec 19, 2011
3 parents 04ded16 + 4af3ce0 + 29d1b16 commit 480390c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions drivers/infiniband/hw/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,8 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)

err_counter:
for (; i; --i)
mlx4_counter_free(ibdev->dev, ibdev->counters[i - 1]);
if (ibdev->counters[i - 1] != -1)
mlx4_counter_free(ibdev->dev, ibdev->counters[i - 1]);

err_map:
iounmap(ibdev->uar_map);
Expand Down Expand Up @@ -1275,7 +1276,8 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr)
}
iounmap(ibdev->uar_map);
for (p = 0; p < ibdev->num_ports; ++p)
mlx4_counter_free(ibdev->dev, ibdev->counters[p]);
if (ibdev->counters[p] != -1)
mlx4_counter_free(ibdev->dev, ibdev->counters[p]);
mlx4_foreach_port(p, dev, MLX4_PORT_TYPE_IB)
mlx4_CLOSE_PORT(dev, p);

Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/qib/qib_file_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ static int setup_ctxt(struct qib_pportdata *ppd, int ctxt,
strlcpy(rcd->comm, current->comm, sizeof(rcd->comm));
ctxt_fp(fp) = rcd;
qib_stats.sps_ctxts++;
dd->freectxts++;
dd->freectxts--;
ret = 0;
goto bail;

Expand Down Expand Up @@ -1794,7 +1794,7 @@ static int qib_close(struct inode *in, struct file *fp)
if (dd->pageshadow)
unlock_expected_tids(rcd);
qib_stats.sps_ctxts--;
dd->freectxts--;
dd->freectxts++;
}

mutex_unlock(&qib_mutex);
Expand Down

0 comments on commit 480390c

Please sign in to comment.