]> Zhao Yanbai Git Server - minix.git/commitdiff
atl2: resolve Coverity warnings
authorDavid van Moolenbroek <david@minix3.org>
Fri, 27 Jul 2012 14:51:52 +0000 (14:51 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Mon, 30 Jul 2012 12:10:10 +0000 (12:10 +0000)
drivers/atl2/atl2.c

index 157121bdcdce1f3a6310bd15126e02dc1ca4e49f..60c2ecd6dfcc72432a0a73bd8acf010c39378ac0 100644 (file)
@@ -462,7 +462,9 @@ static int atl2_probe(int skip)
        /* Find a matching PCI device.
         */
        u16_t vid, did;
+#if VERBOSE
        char *dname;
+#endif
        int r, devind;
 
        pci_init();
@@ -477,10 +479,12 @@ static int atl2_probe(int skip)
                        return -1;
        }
 
+#if VERBOSE
        dname = pci_dev_name(vid, did);
        ATL2_DEBUG(("ATL2: found %s (%x/%x) at %s\n",
                dname ? dname : "<unknown>", vid, did,
                pci_slot_name(devind)));
+#endif
 
        pci_reserve(devind);