Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple PCIe FMC carrier SPEC
Commits
fd2d09bc
Commit
fd2d09bc
authored
Jun 25, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: do not run DMA with 'count = 0'
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
c38f3bf5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
spec-core-fpga.c
software/kernel/spec-core-fpga.c
+6
-0
No files found.
software/kernel/spec-core-fpga.c
View file @
fd2d09bc
...
...
@@ -260,6 +260,9 @@ static ssize_t spec_fpga_dbg_dma_read(struct file *file, char __user *buf,
int
err
;
void
*
data
;
if
(
count
==
0
)
return
0
;
count
=
min
(
KMALLOC_MAX_SIZE
,
count
);
data
=
kmalloc
(
count
,
GFP_KERNEL
);
if
(
!
data
)
...
...
@@ -290,6 +293,9 @@ static ssize_t spec_fpga_dbg_dma_write(struct file *file,
int
err
;
void
*
data
;
if
(
count
==
0
)
return
0
;
count
=
max
(
KMALLOC_MAX_SIZE
,
count
);
data
=
kmalloc
(
count
,
GFP_KERNEL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment