summaryrefslogtreecommitdiff
path: root/drivers/staging/rdma
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2015-12-02 00:43:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 13:53:37 -0800
commitc0d4c2582fc20bff48e7287997f1cf7201f191d2 (patch)
tree73ceb2d12eca7f485284c99997c9841234d7598d /drivers/staging/rdma
parent9d2b75f696d9a3988e0aab00fca8f931ece35d9c (diff)
staging/rdma/hfi1: diag.c correct sizeof parameter
sizeof should use the variable rather than the struct definition to ensure that type changes are properly accounted for. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma')
-rw-r--r--drivers/staging/rdma/hfi1/diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c
index ed9cfccc860b..70a2614db771 100644
--- a/drivers/staging/rdma/hfi1/diag.c
+++ b/drivers/staging/rdma/hfi1/diag.c
@@ -1482,7 +1482,7 @@ static struct snoop_packet *allocate_snoop_packet(u32 hdr_len,
{
struct snoop_packet *packet;
- packet = kzalloc(sizeof(struct snoop_packet) + hdr_len + data_len
+ packet = kzalloc(sizeof(*packet) + hdr_len + data_len
+ md_len,
GFP_ATOMIC | __GFP_NOWARN);
if (likely(packet))