]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: pci: Fix allocation size of aift kzdev elements
authorRafael Mendonca <rafaelmendsr@gmail.com>
Wed, 26 Oct 2022 01:32:33 +0000 (22:32 -0300)
committerJanosch Frank <frankja@linux.ibm.com>
Mon, 7 Nov 2022 09:14:15 +0000 (10:14 +0100)
commit77fa0d4bf914c44094c2b25ae6263ce4fc6cf515
tree509ef340e537d0d4422f42d56b5619e6a11df7eb
parentd4f78ce9159f5b92bcfb93dfa0ce88857cebcec1
KVM: s390: pci: Fix allocation size of aift kzdev elements

The 'kzdev' field of struct 'zpci_aift' is an array of pointers to
'kvm_zdev' structs. Allocate the proper size accordingly.

Reported by Coccinelle:
  WARNING: Use correct pointer type argument for sizeof

Fixes: fe6bb07d6945 ("KVM: s390: pci: do initial setup for AEN interpretation")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20221026013234.960859-1-rafaelmendsr@gmail.com
Message-Id: <20221026013234.960859-1-rafaelmendsr@gmail.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/kvm/pci.c