taprio: Use struct_size() in kzalloc()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Thu, 18 Jun 2020 14:46:48 +0000 (09:46 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:18:43 +0000 (20:18 -0700)
commit11a33de2df06b4ed23844181cb5c03eea67bfed1
tree3a1c88b2dd235be33b24842c1d9569401e5ac9dd
parent1075a4744a32628b6744a616d5d9b3e7df261d35
taprio: Use struct_size() in kzalloc()

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes. Also, remove unnecessary
variable _size_.

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_taprio.c