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
94094c8a
Commit
94094c8a
authored
Aug 08, 2011
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: timer - Add NULL-check for invalid slave timer
Just to be sure. Signed-off-by:
Takashi Iwai
<
tiwai@suse.de
>
parent
0584ffa5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
sound/core/timer.c
sound/core/timer.c
+3
-0
No files found.
sound/core/timer.c
View file @
94094c8a
...
@@ -328,6 +328,8 @@ int snd_timer_close(struct snd_timer_instance *timeri)
...
@@ -328,6 +328,8 @@ int snd_timer_close(struct snd_timer_instance *timeri)
mutex_unlock
(
&
register_mutex
);
mutex_unlock
(
&
register_mutex
);
}
else
{
}
else
{
timer
=
timeri
->
timer
;
timer
=
timeri
->
timer
;
if
(
snd_BUG_ON
(
!
timer
))
goto
out
;
/* wait, until the active callback is finished */
/* wait, until the active callback is finished */
spin_lock_irq
(
&
timer
->
lock
);
spin_lock_irq
(
&
timer
->
lock
);
while
(
timeri
->
flags
&
SNDRV_TIMER_IFLG_CALLBACK
)
{
while
(
timeri
->
flags
&
SNDRV_TIMER_IFLG_CALLBACK
)
{
...
@@ -353,6 +355,7 @@ int snd_timer_close(struct snd_timer_instance *timeri)
...
@@ -353,6 +355,7 @@ int snd_timer_close(struct snd_timer_instance *timeri)
}
}
mutex_unlock
(
&
register_mutex
);
mutex_unlock
(
&
register_mutex
);
}
}
out:
if
(
timeri
->
private_free
)
if
(
timeri
->
private_free
)
timeri
->
private_free
(
timeri
);
timeri
->
private_free
(
timeri
);
kfree
(
timeri
->
owner
);
kfree
(
timeri
->
owner
);
...
...
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