]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/dma/timb_dma.c
drivers/dma: Eliminate a NULL pointer dereference
[net-next-2.6.git] / drivers / dma / timb_dma.c
index 464fad58dae9d5f7baf166936fa7d5228f514447..2ec1ed56f20436d5e5d3df9e57f1f09f81297997 100644 (file)
@@ -382,7 +382,7 @@ static struct timb_dma_desc *td_alloc_init_desc(struct timb_dma_chan *td_chan)
        td_desc = kzalloc(sizeof(struct timb_dma_desc), GFP_KERNEL);
        if (!td_desc) {
                dev_err(chan2dev(chan), "Failed to alloc descriptor\n");
-               goto err;
+               goto out;
        }
 
        td_desc->desc_list_len = td_chan->desc_elems * TIMB_DMA_DESC_SIZE;
@@ -410,7 +410,7 @@ static struct timb_dma_desc *td_alloc_init_desc(struct timb_dma_chan *td_chan)
 err:
        kfree(td_desc->desc_list);
        kfree(td_desc);
-
+out:
        return NULL;
 
 }