Initialize err to 0 in pci_device_solx_devfs_map_range
authorAlan Coopersmith <alan.coopersmith@sun.com>
Fri, 9 May 2008 21:49:32 +0000 (14:49 -0700)
committerAlan Coopersmith <alan.coopersmith@sun.com>
Fri, 9 May 2008 21:49:32 +0000 (14:49 -0700)
Prevents returning errors when mapping actually succeeds

src/solx_devfs.c

index 08de4d0..eceb9af 100644 (file)
@@ -852,7 +852,7 @@ pci_device_solx_devfs_map_range(struct pci_device *dev,
 {
        const int prot = ((map->flags & PCI_DEV_MAP_FLAG_WRITABLE) != 0) 
                ? (PROT_READ | PROT_WRITE) : PROT_READ;
-       int err;
+       int err = 0;
 
 
        if (xsvc_fd < 0) {