diff options
author | Roland Dreier <rolandd@cisco.com> | 2007-02-10 08:00:47 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-02-10 08:00:47 -0800 |
commit | 99d4f22e91d26e0f8b113bf7fde65a335d36ad6b (patch) | |
tree | 5fbdc16ca1925d1f1cfba0f8011787e4d13c522b /drivers | |
parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) | |
download | op-kernel-dev-99d4f22e91d26e0f8b113bf7fde65a335d36ad6b.zip op-kernel-dev-99d4f22e91d26e0f8b113bf7fde65a335d36ad6b.tar.gz |
IB/mthca: Use correct structure size in call to memset()
When clearing the ib_ah_attr parameter in to_ib_ah_attr(), use sizeof
*ib_ah_attr instead of sizeof *path.
Pointed out by Jack Morgenstein <jackm@mellanox.co.il>.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 5f5214c..224c93d 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -399,7 +399,7 @@ static int to_ib_qp_access_flags(int mthca_flags) static void to_ib_ah_attr(struct mthca_dev *dev, struct ib_ah_attr *ib_ah_attr, struct mthca_qp_path *path) { - memset(ib_ah_attr, 0, sizeof *path); + memset(ib_ah_attr, 0, sizeof *ib_ah_attr); ib_ah_attr->port_num = (be32_to_cpu(path->port_pkey) >> 24) & 0x3; if (ib_ah_attr->port_num == 0 || ib_ah_attr->port_num > dev->limits.num_ports) |