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>
This commit is contained in:
Ira Weiny
2015-12-02 00:43:32 -05:00
committed by Greg Kroah-Hartman
parent 9d2b75f696
commit c0d4c2582f

View File

@@ -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))