Showing error 1286

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/mmc/host/sdhci.c
Line in file: 307
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 277                mask = SDHCI_DATA_AVAILABLE;
 278        else
 279                mask = SDHCI_SPACE_AVAILABLE;
 280
 281        /*
 282         * Some controllers (JMicron JMB38x) mess up the buffer bits
 283         * for transfers < 4 bytes. As long as it is just one block,
 284         * we can ignore the bits.
 285         */
 286        if ((host->quirks & SDHCI_QUIRK_BROKEN_SMALL_PIO) &&
 287                (host->data->blocks == 1))
 288                mask = ~0;
 289
 290        while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) {
 291                if (host->data->flags & MMC_DATA_READ)
 292                        sdhci_read_block_pio(host);
 293                else
 294                        sdhci_write_block_pio(host);
 295
 296                host->blocks--;
 297                if (host->blocks == 0)
 298                        break;
 299        }
 300
 301        DBG("PIO transfer complete.\n");
 302}
 303
 304static char *sdhci_kmap_atomic(struct scatterlist *sg, unsigned long *flags)
 305{
 306        local_irq_save(*flags);
 307        return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
 308}
 309
 310static void sdhci_kunmap_atomic(void *buffer, unsigned long *flags)
 311{
 312        kunmap_atomic(buffer, KM_BIO_SRC_IRQ);
 313        local_irq_restore(*flags);
 314}
 315
 316static int sdhci_adma_table_pre(struct sdhci_host *host,
 317        struct mmc_data *data)
Show full sources