mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 13:43:21 -04:00
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:
committed by
Greg Kroah-Hartman
parent
9d2b75f696
commit
c0d4c2582f
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user