Showing error 888

User: Jiri Slaby
Error type: Resource Leak
Error type description: The code omits to put the resource to the system for reuse
File location: drivers/char/rocket.c
Line in file: 2230
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:41:42 UTC


Source:

2200        }
2201
2202        /*  Rocket modems must be reset */
2203        if ((rcktpt_type[i] == ROCKET_TYPE_MODEM) ||
2204            (rcktpt_type[i] == ROCKET_TYPE_MODEMII) ||
2205            (rcktpt_type[i] == ROCKET_TYPE_MODEMIII)) {
2206                num_chan = ports_per_aiop;
2207                for (chan = 0; chan < num_chan; chan++)
2208                        sPCIModemReset(ctlp, chan, 1);
2209                msleep(500);
2210                for (chan = 0; chan < num_chan; chan++)
2211                        sPCIModemReset(ctlp, chan, 0);
2212                msleep(500);
2213                rmSpeakerReset(ctlp, rocketModel[i].model);
2214        }
2215        return (1);
2216}
2217
2218/*
2219 *  Probes for PCI cards, inits them if found
2220 *  Input:   board_found = number of ISA boards already found, or the
2221 *           starting board number
2222 *  Returns: Number of PCI boards found
2223 */
2224static int __init init_PCI(int boards_found)
2225{
2226        struct pci_dev *dev = NULL;
2227        int count = 0;
2228
2229        /*  Work through the PCI device list, pulling out ours */
2230        while ((dev = pci_get_device(PCI_VENDOR_ID_RP, PCI_ANY_ID, dev))) {
2231                if (register_PCI(count + boards_found, dev))
2232                        count++;
2233        }
2234        return (count);
2235}
2236
2237#endif                                /* CONFIG_PCI */
2238
2239/*
2240 *  Probes for ISA cards
Show full sources