Browse Source

[PATCH] IB/mthca: Fix memset size

Fix memset to use sizeof *props instead of just sizeof props.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Roland Dreier 20 years ago
parent
commit
a852092e8c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/infiniband/hw/mthca/mthca_provider.c

+ 1 - 1
drivers/infiniband/hw/mthca/mthca_provider.c

@@ -53,7 +53,7 @@ static int mthca_query_device(struct ib_device *ibdev,
 	if (!in_mad || !out_mad)
 	if (!in_mad || !out_mad)
 		goto out;
 		goto out;
 
 
-	memset(props, 0, sizeof props);
+	memset(props, 0, sizeof *props);
 
 
 	props->fw_ver              = mdev->fw_ver;
 	props->fw_ver              = mdev->fw_ver;