]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Improve __pci_read_base() robustness
authorMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Mon, 10 Apr 2017 17:46:54 +0000 (19:46 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 18 Apr 2017 19:11:10 +0000 (14:11 -0500)
commit389bf004dd5507e7f222980d35ba7d1dc3e35645
treeb0104e99320fd7a22972067ca9a40ea00f7c79dc
parent00596541dd9dfb82e03b0e3e31811f5cd671fd8f
PCI: Improve __pci_read_base() robustness

Local variables 'l' and 'sz' are uninitialized.  Normally, they would
be initialized by pci_read_config_dword() but when an error occurs,
some drivers immediately return an error code, which leaves the
argument uninitialized.

Provide a safe initial value to make the code more robust.

Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c