[PATCH] Fix NULL dereference when suspending snd_opl3sa2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



This should fix the following OOPS:
http://www.kerneloops.org/raw.php?rawid=80591&msgid=

Signed-off-by: Lubomir Rintel <lkundrak@xxxxx>
---
 sound/isa/opl3sa2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 58c972b..483c284 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -553,7 +553,8 @@ static int snd_opl3sa2_suspend(struct snd_card
*card, pm_message_t state)
 	struct snd_opl3sa2 *chip = card->private_data;
 
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
-	chip->wss->suspend(chip->wss);
+	if (chip->wss->suspend)
+		chip->wss->suspend(chip->wss);
 	/* power down */
 	snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3);
 
-- 
1.5.5.6



--
To unsubscribe from this list: send the line "unsubscribe linux-sound" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux