Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions drivers/media/pci/hailo/vdma/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@
goto cleanup;
}

mmap_read_lock(current->mm);

Check failure on line 166 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line

Check failure on line 166 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
if (HAILO_DMA_DMABUF_BUFFER != buffer_type) {
vma = find_vma(current->mm, user_address);
if (IS_ENABLED(HAILO_SUPPORT_MMIO_DMA_MAPPING)) {
if (NULL == vma) {
dev_err(dev, "no vma for virt_addr/size = 0x%08lx/0x%08zx\n", user_address, size);
ret = -EFAULT;
goto cleanup;
goto unlock_cleanup;

Check failure on line 173 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 173 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line

Check failure on line 173 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 173 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
}
}

Expand All @@ -179,7 +180,7 @@
ret = create_fd_from_vma(dev, vma);
if (ret < 0) {
dev_err(dev, "Failed creating fd from vma in given dmabuf\n");
goto cleanup;
goto unlock_cleanup;

Check failure on line 183 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 183 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line

Check failure on line 183 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 183 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
}
// Override user address with fd to the dmabuf - like normal dmabuf flow
user_address = ret;
Expand Down Expand Up @@ -212,7 +213,7 @@
ret = hailo_map_dmabuf(dev, user_address, direction, &sgt, &dmabuf_info);
if (ret < 0) {
dev_err(dev, "Failed mapping dmabuf\n");
goto cleanup;
goto unlock_cleanup;

Check failure on line 216 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 216 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line

Check failure on line 216 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 216 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
}
// If created dmabuf fd from vma need to decrement refcount and release fd
if (created_dmabuf_fd_from_vma) {
Expand All @@ -234,6 +235,8 @@
}
}

mmap_read_unlock(current->mm);

Check failure on line 238 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line

Check failure on line 238 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line

kref_init(&mapped_buffer->kref);
mapped_buffer->device = dev;
mapped_buffer->user_address = user_address;
Expand All @@ -249,6 +252,8 @@
clear_sg_table(&sgt);
free_buffer_struct:
kfree(mapped_buffer);
unlock_cleanup:
mmap_read_unlock(current->mm);

Check failure on line 256 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line

Check failure on line 256 in drivers/media/pci/hailo/vdma/memory.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
cleanup:
return ERR_PTR(ret);
}
Expand Down
Loading