]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI/AER: Initialize aer_err_info before using it
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 22 May 2025 23:21:14 +0000 (18:21 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 23 May 2025 16:01:06 +0000 (11:01 -0500)
commit57964ba39057a76f3485437347bb4219be9c5b52
treef4fc0613505f63962c75d67375137796d087a266
parentca2426a570ab4bdf6185aea034ee09184420bd0d
PCI/AER: Initialize aer_err_info before using it

Previously the struct aer_err_info "e_info" was allocated on the stack
without being initialized, so it contained junk except for the fields we
explicitly set later.

Initialize "e_info" at declaration with a designated initializer list,
which initializes the other members to zero.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://patch.msgid.link/20250522232339.1525671-9-helgaas@kernel.org
drivers/pci/pcie/aer.c