diff options
author | Frank Haverkamp <haver@linux.vnet.ibm.com> | 2014-09-10 18:37:46 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-24 10:15:46 +0400 |
commit | 95a8825c9c3482e31ee5064184138a18be186515 (patch) | |
tree | 4d0e262dfdb5797c0fc18f895d1eed00aaafaed9 /drivers/misc/genwqe/card_base.h | |
parent | ffdbb715fa0c53203b1ea2a6ecc54bdcc8951612 (diff) | |
download | linux-95a8825c9c3482e31ee5064184138a18be186515.tar.xz |
GenWQE: Check pci_get_totalvfs return code
Currently the driver is using the pci_get_totalvfs() return code
directly in a loop. To avoid problems with potentially negative
returns in case of errors, we are adding some more sanity checking
code.
Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/genwqe/card_base.h')
-rw-r--r-- | drivers/misc/genwqe/card_base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/genwqe/card_base.h b/drivers/misc/genwqe/card_base.h index 67abd8cb2247..37657d6228de 100644 --- a/drivers/misc/genwqe/card_base.h +++ b/drivers/misc/genwqe/card_base.h @@ -306,7 +306,7 @@ struct genwqe_dev { struct pci_dev *pci_dev; /* PCI device */ void __iomem *mmio; /* BAR-0 MMIO start */ unsigned long mmio_len; - u16 num_vfs; + int num_vfs; u32 vf_jobtimeout_msec[GENWQE_MAX_VFS]; int is_privileged; /* access to all regs possible */ |