WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 05/31] Fix compile warning: ignoring return value of

Make sure to check the return value and if it is a failure,
provide a descriptive message and quit.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pcifront/pci_op.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/pcifront/pci_op.c b/drivers/xen/pcifront/pci_op.c
index b239cf0..03ed1f9 100644
--- a/drivers/xen/pcifront/pci_op.c
+++ b/drivers/xen/pcifront/pci_op.c
@@ -497,6 +497,7 @@ int __devinit pcifront_rescan_root(struct pcifront_device 
*pdev,
        struct pci_bus *b;
        struct pci_dev *d;
        unsigned int devfn;
+       int err;
 
 #ifndef CONFIG_PCI_DOMAINS
        if (domain != 0) {
@@ -533,7 +534,13 @@ int __devinit pcifront_rescan_root(struct pcifront_device 
*pdev,
                        dev_info(&pdev->xdev->dev, "New device on "
                                 "%04x:%02x:%02x.%02x found.\n", domain, bus,
                                 PCI_SLOT(devfn), PCI_FUNC(devfn));
-                       pci_bus_add_device(d);
+                       err = pci_bus_add_device(d);
+                       if (err) {
+                               dev_err(&pdev->xdev->dev, "Failed to add "
+                               " device to bus.\n");
+                               return err;
+                       }
+                       
                }
        }
 
-- 
1.6.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>