]> xenbits.xensource.com Git - libvirt.git/commitdiff
pciFindStubDriver should return NULL on error
authorChris Wright <chrisw@redhat.com>
Wed, 22 Sep 2010 22:54:23 +0000 (15:54 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 22 Sep 2010 23:22:09 +0000 (17:22 -0600)
pciFindStubDriver currently returns 0 in one of the error cases.
While it's correct...NULL is more readable.

Signed-off-by: Chris Wright <chrisw@redhat.com>
src/util/pci.c

index a5594766d7ded6c3674f8af513d67bf3a3654cfa..22c66fa42d952734a96dddd1f8cee7958d77bcf6 100644 (file)
@@ -826,7 +826,7 @@ recheck:
             char ebuf[1024];
             VIR_WARN("failed to load pci-stub or pciback drivers: %s",
                      virStrerror(errno, ebuf, sizeof ebuf));
-            return 0;
+            return NULL;
         }
 
         goto recheck;