diff options
| author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-09-17 17:58:27 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-30 09:40:15 -0700 |
| commit | 52be2ebd4e2c3c332e68fd8806607ceed0abbd0a (patch) | |
| tree | 943bf00e10ce2f8691c3e944f51729afdcbcaa61 /include/uapi/linux/tipc.h | |
| parent | 3308bca6b5c6854e9c5927b86d727f561346f4e9 (diff) | |
PCI: mvebu: Fix uninitialized variable in mvebu_get_tgt_attr()
commit 56fab6e189441d714a2bfc8a64f3df9c0749dff7 upstream.
Geert Uytterhoeven reported a warning when building pci-mvebu:
drivers/pci/host/pci-mvebu.c: In function 'mvebu_get_tgt_attr':
drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (slot == PCI_SLOT(devfn) && type == rtype) {
^
And indeed, the code of mvebu_get_tgt_attr() may lead to the usage of rtype
when being uninitialized, even though it would only happen if we had
entries other than I/O space and 32 bits memory space.
This commit fixes that by simply skipping the current DT range being
considered, if it doesn't match the resource type we're looking for.
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/tipc.h')
0 files changed, 0 insertions, 0 deletions
