Showing error 884

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/mmc/host/sdricoh_cs.c
Line in file: 483
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:41:42 UTC


Source:

453                goto err;
454
455        }
456
457        result = mmc_add_host(mmc);
458
459        if (!result) {
460                dev_dbg(dev, "mmc host registered\n");
461                return 0;
462        }
463
464err:
465        if (iobase)
466                iounmap(iobase);
467        if (mmc)
468                mmc_free_host(mmc);
469
470        return result;
471}
472
473/* search for supported mmc controllers */
474static int sdricoh_pcmcia_probe(struct pcmcia_device *pcmcia_dev)
475{
476        struct pci_dev *pci_dev = NULL;
477
478        dev_info(&pcmcia_dev->dev, "Searching MMC controller for pcmcia device"
479                " %s %s ...\n", pcmcia_dev->prod_id[0], pcmcia_dev->prod_id[1]);
480
481        /* search pci cardbus bridge that contains the mmc controler */
482        /* the io region is already claimed by yenta_socket... */
483        while ((pci_dev =
484                pci_get_device(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C476,
485                               pci_dev))) {
486                /* try to init the device */
487                if (!sdricoh_init_mmc(pci_dev, pcmcia_dev)) {
488                        dev_info(&pcmcia_dev->dev, "MMC controller found\n");
489                        return 0;
490                }
491
492        }
493        dev_err(&pcmcia_dev->dev, "No MMC controller was found.\n");
Show full sources