Commit c0d4c258 authored by Ira Weiny's avatar Ira Weiny Committed by Greg Kroah-Hartman

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: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9d2b75f6
...@@ -1482,7 +1482,7 @@ static struct snoop_packet *allocate_snoop_packet(u32 hdr_len, ...@@ -1482,7 +1482,7 @@ static struct snoop_packet *allocate_snoop_packet(u32 hdr_len,
{ {
struct snoop_packet *packet; struct snoop_packet *packet;
packet = kzalloc(sizeof(struct snoop_packet) + hdr_len + data_len packet = kzalloc(sizeof(*packet) + hdr_len + data_len
+ md_len, + md_len,
GFP_ATOMIC | __GFP_NOWARN); GFP_ATOMIC | __GFP_NOWARN);
if (likely(packet)) if (likely(packet))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment