mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
[ALSA] ac97 - NULL check in snd_ac97_suspend/resume
Modules: AC97 Codec Add NULL check in snd_ac97_suspend() and snd_ac97_resume() so that the caller doesn't have to do it by itself. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
603bf524aa
commit
e26e7545e9
1 changed files with 5 additions and 0 deletions
|
@ -2186,6 +2186,8 @@ static void snd_ac97_powerdown(struct snd_ac97 *ac97)
|
|||
*/
|
||||
void snd_ac97_suspend(struct snd_ac97 *ac97)
|
||||
{
|
||||
if (! ac97)
|
||||
return;
|
||||
if (ac97->build_ops->suspend)
|
||||
ac97->build_ops->suspend(ac97);
|
||||
snd_ac97_powerdown(ac97);
|
||||
|
@ -2242,6 +2244,9 @@ void snd_ac97_resume(struct snd_ac97 *ac97)
|
|||
{
|
||||
unsigned long end_time;
|
||||
|
||||
if (! ac97)
|
||||
return;
|
||||
|
||||
if (ac97->bus->ops->reset) {
|
||||
ac97->bus->ops->reset(ac97);
|
||||
goto __reset_ready;
|
||||
|
|
Loading…
Reference in a new issue