]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/misc/fastrpc.c
drm/udl: Store active framebuffer in device structure
[linux.git] / drivers / misc / fastrpc.c
index 47ae84afac2e1ee39e93d771f60ebdb49bb78092..d0cbef9ec28a14a9811d63221650b49310eb1543 100644 (file)
@@ -527,6 +527,7 @@ static int fastrpc_dma_buf_attach(struct dma_buf *dmabuf,
                              FASTRPC_PHYS(buffer->phys), buffer->size);
        if (ret < 0) {
                dev_err(buffer->dev, "failed to get scatterlist from DMA API\n");
+               kfree(a);
                return -EINVAL;
        }
 
@@ -554,13 +555,6 @@ static void fastrpc_dma_buf_detatch(struct dma_buf *dmabuf,
        kfree(a);
 }
 
-static void *fastrpc_kmap(struct dma_buf *dmabuf, unsigned long pgnum)
-{
-       struct fastrpc_buf *buf = dmabuf->priv;
-
-       return buf->virt ? buf->virt + pgnum * PAGE_SIZE : NULL;
-}
-
 static void *fastrpc_vmap(struct dma_buf *dmabuf)
 {
        struct fastrpc_buf *buf = dmabuf->priv;
@@ -584,7 +578,6 @@ static const struct dma_buf_ops fastrpc_dma_buf_ops = {
        .map_dma_buf = fastrpc_map_dma_buf,
        .unmap_dma_buf = fastrpc_unmap_dma_buf,
        .mmap = fastrpc_mmap,
-       .map = fastrpc_kmap,
        .vmap = fastrpc_vmap,
        .release = fastrpc_release,
 };