Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
059019a3
Commit
059019a3
authored
Jul 08, 2009
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] cleanup up -ENOMEM handling in cpufreq_add_dev
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
54e6fe16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+6
-9
No files found.
drivers/cpufreq/cpufreq.c
View file @
059019a3
...
...
@@ -798,19 +798,16 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
goto
module_out
;
}
ret
=
-
ENOMEM
;
policy
=
kzalloc
(
sizeof
(
struct
cpufreq_policy
),
GFP_KERNEL
);
if
(
!
policy
)
{
ret
=
-
ENOMEM
;
if
(
!
policy
)
goto
nomem_out
;
}
if
(
!
alloc_cpumask_var
(
&
policy
->
cpus
,
GFP_KERNEL
))
{
ret
=
-
ENOMEM
;
if
(
!
alloc_cpumask_var
(
&
policy
->
cpus
,
GFP_KERNEL
))
goto
err_free_policy
;
}
if
(
!
zalloc_cpumask_var
(
&
policy
->
related_cpus
,
GFP_KERNEL
))
{
ret
=
-
ENOMEM
;
if
(
!
zalloc_cpumask_var
(
&
policy
->
related_cpus
,
GFP_KERNEL
))
goto
err_free_cpumask
;
}
policy
->
cpu
=
cpu
;
cpumask_copy
(
policy
->
cpus
,
cpumask_of
(
cpu
));
...
...
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