Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18301
b: refs/heads/master
c: 105e50a
h: refs/heads/master
i:
  18299: 42138c3
v: v3
  • Loading branch information
Roland Dreier committed Jan 9, 2006
1 parent d002178 commit b419e5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92898522e3ee1a0ba54140aad1974d9e868f74ae
refs/heads/master: 105e50a5e8f184af31daffce4d7bfd7771fe213f
12 changes: 4 additions & 8 deletions trunk/drivers/infiniband/hw/mthca/mthca_provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static int mthca_query_device(struct ib_device *ibdev,

u8 status;

in_mad = kmalloc(sizeof *in_mad, GFP_KERNEL);
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
if (!in_mad || !out_mad)
goto out;
Expand All @@ -64,7 +64,6 @@ static int mthca_query_device(struct ib_device *ibdev,

props->fw_ver = mdev->fw_ver;

memset(in_mad, 0, sizeof *in_mad);
in_mad->base_version = 1;
in_mad->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED;
in_mad->class_version = 1;
Expand Down Expand Up @@ -128,14 +127,13 @@ static int mthca_query_port(struct ib_device *ibdev,
int err = -ENOMEM;
u8 status;

in_mad = kmalloc(sizeof *in_mad, GFP_KERNEL);
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
if (!in_mad || !out_mad)
goto out;

memset(props, 0, sizeof *props);

memset(in_mad, 0, sizeof *in_mad);
in_mad->base_version = 1;
in_mad->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED;
in_mad->class_version = 1;
Expand Down Expand Up @@ -220,12 +218,11 @@ static int mthca_query_pkey(struct ib_device *ibdev,
int err = -ENOMEM;
u8 status;

in_mad = kmalloc(sizeof *in_mad, GFP_KERNEL);
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
if (!in_mad || !out_mad)
goto out;

memset(in_mad, 0, sizeof *in_mad);
in_mad->base_version = 1;
in_mad->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED;
in_mad->class_version = 1;
Expand Down Expand Up @@ -259,12 +256,11 @@ static int mthca_query_gid(struct ib_device *ibdev, u8 port,
int err = -ENOMEM;
u8 status;

in_mad = kmalloc(sizeof *in_mad, GFP_KERNEL);
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
if (!in_mad || !out_mad)
goto out;

memset(in_mad, 0, sizeof *in_mad);
in_mad->base_version = 1;
in_mad->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED;
in_mad->class_version = 1;
Expand Down

0 comments on commit b419e5e

Please sign in to comment.