LinuxKPI: pci.h: always initialize return value
In pcie_capability_read_*() always initialize the return value to avoid warnings of uninitialized values in callers. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39721
This commit is contained in:
@@ -1178,6 +1178,7 @@ static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos)
|
||||
static inline int
|
||||
pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *dst)
|
||||
{
|
||||
*dst = 0;
|
||||
if (pos & 3)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1190,6 +1191,7 @@ pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *dst)
|
||||
static inline int
|
||||
pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *dst)
|
||||
{
|
||||
*dst = 0;
|
||||
if (pos & 3)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user