]> www.infradead.org Git - nvme.git/commit
wifi: iwlwifi: dbg-tlv: use struct_size() for allocation
authorJohannes Berg <johannes.berg@intel.com>
Sun, 28 Jan 2024 06:53:52 +0000 (08:53 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 2 Feb 2024 12:47:46 +0000 (13:47 +0100)
commit1722c83f8fbba56c03e0ac597a242c8b0ef4d62c
tree2638942bd390c2241e5c59bcc345a15c1583284d
parent2f72c759fdd413bbfd8888af8e31312b34d2be33
wifi: iwlwifi: dbg-tlv: use struct_size() for allocation

This is effectively the same since we don't even have a
multiplication, but better captures what happens with
the length.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240128084842.f301641eb916.I66b7b48a526377d682eecef874373bf3a01076c8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c