Forgetting to check this, can lead to problems on systems which
do not support SRIOV.
Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 static int genwqe_sriov_configure(struct pci_dev *dev, int numvfs)
 {
+       int rc;
        struct genwqe_dev *cd = dev_get_drvdata(&dev->dev);
 
        if (numvfs > 0) {
                genwqe_setup_vf_jtimer(cd);
-               pci_enable_sriov(dev, numvfs);
+               rc = pci_enable_sriov(dev, numvfs);
+               if (rc < 0)
+                       return rc;
                return numvfs;
        }
        if (numvfs == 0) {