public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-sound@vger.kernel.org
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>,
	stable@kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] Fix NULL dereference when suspending snd_opl3sa2
Date: Mon, 16 Mar 2009 11:01:49 +0100	[thread overview]
Message-ID: <1237197709.7210.2.camel@localhost.localdomain> (raw)

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

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 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




             reply	other threads:[~2009-03-16 10:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 10:01 Lubomir Rintel [this message]
2009-03-16 14:16 ` [PATCH] Fix NULL dereference when suspending snd_opl3sa2 Lubomir Rintel
2009-03-16 18:21   ` Krzysztof Helt
2009-03-16 20:32   ` Krzysztof Helt
2009-03-17  8:30     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1237197709.7210.2.camel@localhost.localdomain \
    --to=lkundrak@v3.sk \
    --cc=akpm@linux-foundation.org \
    --cc=krzysztof.h1@wp.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox