Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
FMC DEL 1ns 4cha - Software
Commits
fcbce05c
Commit
fcbce05c
authored
Jun 30, 2014
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: fix mem leakage
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
68fac77a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
fd-core.c
kernel/fd-core.c
+7
-6
fd-irq.c
kernel/fd-irq.c
+5
-1
No files found.
kernel/fd-core.c
View file @
fcbce05c
...
@@ -131,12 +131,7 @@ int fd_probe(struct fmc_device *fmc)
...
@@ -131,12 +131,7 @@ int fd_probe(struct fmc_device *fmc)
char
*
fwname
;
char
*
fwname
;
int
i
,
index
,
ret
,
ch
;
int
i
,
index
,
ret
,
ch
;
fd
=
kzalloc
(
sizeof
(
*
fd
),
GFP_KERNEL
);
/* Validate the new FMC device */
if
(
!
fd
)
{
dev_err
(
dev
,
"can't allocate device
\n
"
);
return
-
ENOMEM
;
}
index
=
fmc
->
op
->
validate
(
fmc
,
&
fd_drv
);
index
=
fmc
->
op
->
validate
(
fmc
,
&
fd_drv
);
if
(
index
<
0
)
{
if
(
index
<
0
)
{
dev_info
(
dev
,
"not using
\"
%s
\"
according to "
dev_info
(
dev
,
"not using
\"
%s
\"
according to "
...
@@ -144,6 +139,12 @@ int fd_probe(struct fmc_device *fmc)
...
@@ -144,6 +139,12 @@ int fd_probe(struct fmc_device *fmc)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
fd
=
devm_kzalloc
(
&
fmc
->
dev
,
sizeof
(
*
fd
),
GFP_KERNEL
);
if
(
!
fd
)
{
dev_err
(
dev
,
"can't allocate device
\n
"
);
return
-
ENOMEM
;
}
fwname
=
""
;
fwname
=
""
;
if
(
!
strcmp
(
fmc
->
carrier_name
,
"SVEC"
))
if
(
!
strcmp
(
fmc
->
carrier_name
,
"SVEC"
))
...
...
kernel/fd-irq.c
View file @
fcbce05c
...
@@ -324,7 +324,7 @@ int fd_irq_init(struct fd_dev *fd)
...
@@ -324,7 +324,7 @@ int fd_irq_init(struct fd_dev *fd)
if
(
rv
<
0
)
{
if
(
rv
<
0
)
{
dev_err
(
&
fd
->
fmc
->
dev
,
dev_err
(
&
fd
->
fmc
->
dev
,
"Failed to request the VIC interrupt
\n
"
);
"Failed to request the VIC interrupt
\n
"
);
return
rv
;
goto
out_irq_request
;
}
}
/*
/*
...
@@ -344,6 +344,10 @@ int fd_irq_init(struct fd_dev *fd)
...
@@ -344,6 +344,10 @@ int fd_irq_init(struct fd_dev *fd)
fd_writel
(
fd
,
FD_GCR_INPUT_EN
,
FD_REG_GCR
);
fd_writel
(
fd
,
FD_GCR_INPUT_EN
,
FD_REG_GCR
);
return
0
;
return
0
;
out_irq_request:
kfree
(
fd
->
sw_fifo
.
t
);
return
rv
;
}
}
void
fd_irq_exit
(
struct
fd_dev
*
fd
)
void
fd_irq_exit
(
struct
fd_dev
*
fd
)
...
...
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