Showing error 987

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/dma/ioat_dma.c
Line in file: 1045
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:18 UTC


Source:

1015                dev_err(&ioat_chan->device->pdev->dev,
1016                        "chan%d - get_next_desc failed: %d descs waiting, %d total desc\n",
1017                        chan_num(ioat_chan), ioat_chan->dmacount, ioat_chan->desccount);
1018                return NULL;
1019        }
1020}
1021
1022static struct dma_async_tx_descriptor *ioat2_dma_prep_memcpy(
1023                                                struct dma_chan *chan,
1024                                                dma_addr_t dma_dest,
1025                                                dma_addr_t dma_src,
1026                                                size_t len,
1027                                                unsigned long flags)
1028{
1029        struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan);
1030        struct ioat_desc_sw *new;
1031
1032        spin_lock_bh(&ioat_chan->desc_lock);
1033        new = ioat2_dma_get_next_descriptor(ioat_chan);
1034
1035        /*
1036         * leave ioat_chan->desc_lock set in ioat 2 path
1037         * it will get unlocked at end of tx_submit
1038         */
1039
1040        if (new) {
1041                new->len = len;
1042                new->dst = dma_dest;
1043                new->src = dma_src;
1044                new->async_tx.flags = flags;
1045                return &new->async_tx;
1046        } else {
1047                spin_unlock_bh(&ioat_chan->desc_lock);
1048                dev_err(&ioat_chan->device->pdev->dev,
1049                        "chan%d - get_next_desc failed: %d descs waiting, %d total desc\n",
1050                        chan_num(ioat_chan), ioat_chan->dmacount, ioat_chan->desccount);
1051                return NULL;
1052        }
1053}
1054
1055static void ioat_dma_cleanup_tasklet(unsigned long data)
Show full sources