Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
c9060494
Commit
c9060494
authored
Feb 07, 2008
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Slightly shorten the error paths of cpufreq_suspend/cpufreq_resume
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
e31a94ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+8
-14
No files found.
drivers/cpufreq/cpufreq.c
View file @
c9060494
...
...
@@ -1221,22 +1221,18 @@ static int cpufreq_suspend(struct sys_device * sysdev, pm_message_t pmsg)
return
-
EINVAL
;
/* only handle each CPU group once */
if
(
unlikely
(
cpu_policy
->
cpu
!=
cpu
))
{
cpufreq_cpu_put
(
cpu_policy
);
return
0
;
}
if
(
unlikely
(
cpu_policy
->
cpu
!=
cpu
))
goto
out
;
if
(
cpufreq_driver
->
suspend
)
{
ret
=
cpufreq_driver
->
suspend
(
cpu_policy
,
pmsg
);
if
(
ret
)
{
printk
(
KERN_ERR
"cpufreq: suspend failed in ->suspend "
"step on CPU %u
\n
"
,
cpu_policy
->
cpu
);
cpufreq_cpu_put
(
cpu_policy
);
return
ret
;
goto
out
;
}
}
if
(
cpufreq_driver
->
flags
&
CPUFREQ_CONST_LOOPS
)
goto
out
;
...
...
@@ -1270,7 +1266,7 @@ static int cpufreq_suspend(struct sys_device * sysdev, pm_message_t pmsg)
out:
cpufreq_cpu_put
(
cpu_policy
);
return
0
;
return
ret
;
}
/**
...
...
@@ -1302,18 +1298,15 @@ static int cpufreq_resume(struct sys_device * sysdev)
return
-
EINVAL
;
/* only handle each CPU group once */
if
(
unlikely
(
cpu_policy
->
cpu
!=
cpu
))
{
cpufreq_cpu_put
(
cpu_policy
);
return
0
;
}
if
(
unlikely
(
cpu_policy
->
cpu
!=
cpu
))
goto
fail
;
if
(
cpufreq_driver
->
resume
)
{
ret
=
cpufreq_driver
->
resume
(
cpu_policy
);
if
(
ret
)
{
printk
(
KERN_ERR
"cpufreq: resume failed in ->resume "
"step on CPU %u
\n
"
,
cpu_policy
->
cpu
);
cpufreq_cpu_put
(
cpu_policy
);
return
ret
;
goto
fail
;
}
}
...
...
@@ -1353,6 +1346,7 @@ static int cpufreq_resume(struct sys_device * sysdev)
out:
schedule_work
(
&
cpu_policy
->
update
);
fail:
cpufreq_cpu_put
(
cpu_policy
);
return
ret
;
}
...
...
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