acrn-kernel/drivers/pci
Xinghui Li e2e52c8dfb PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain()
[ Upstream commit 0c0206dc4f ]

The ret variable in the vmd_enable_domain() function was used
uninitialized when printing a warning message upon failure of
the pci_reset_bus() function.

Thus, fix the issue by assigning ret with the value returned from
pci_reset_bus() before referencing it in the warning message.

This was detected by Smatch:

  drivers/pci/controller/vmd.c:931 vmd_enable_domain() error: uninitialized symbol 'ret'.

[kwilczynski: drop the second patch from the series, add missing reported
by tag, commit log]
Fixes: 0a584655ef ("PCI: vmd: Fix secondary bus reset for Intel bridges")
Link: https://lore.kernel.org/all/202305270219.B96IiIfv-lkp@intel.com
Link: https://lore.kernel.org/linux-pci/20230420094332.1507900-2-korantwork@gmail.com
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Xinghui Li <korantli@tencent.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:41 +02:00
..
controller PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain() 2023-07-19 16:21:41 +02:00
endpoint PCI: endpoint: functions/pci-epf-test: Fix dma_chan direction 2023-07-19 16:21:40 +02:00
hotplug PCI: pciehp: Cancel bringup sequence if card is not present 2023-07-19 16:21:35 +02:00
msi
pcie PCI/ASPM: Disable ASPM on MFD function removal to avoid use-after-free 2023-07-19 16:21:35 +02:00
switch
Kconfig
Makefile
access.c
ats.c
bus.c
doe.c
ecam.c
host-bridge.c
iov.c
irq.c
mmap.c
of.c
p2pdma.c
pci-acpi.c PCI/ACPI: Call _REG when transitioning D-states 2023-07-05 18:27:37 +01:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c
pci.c
pci.h
probe.c
proc.c
quirks.c
remove.c
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c
syscall.c
vc.c
vgaarb.c
vpd.c
xen-pcifront.c