public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com>
To: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com>,
	alsa-devel@alsa-project.org
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] ice1712: check if snd card loaded, if not do not proceed
Date: Fri, 11 Jul 2014 04:19:37 +0000	[thread overview]
Message-ID: <1405052377-3096-1-git-send-email-kostaslinuxxx@gmail.com> (raw)

Just adding a simple if statement, which
verifies if actually card is loaded, if not
does not continue with the execution
of the snd_card_free.

Signed-off-by: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com>
---
 sound/pci/ice1712/ice1712.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index d9b9e45..431096b 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2819,7 +2819,8 @@ static void snd_ice1712_remove(struct pci_dev *pci)
 
 	if (ice->card_info && ice->card_info->chip_exit)
 		ice->card_info->chip_exit(ice);
-	snd_card_free(card);
+	if (card)
+		snd_card_free(card);
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
1.9.1


             reply	other threads:[~2014-07-11  4:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  4:19 Konstantinos Tsimpoukas [this message]
2014-07-11 10:06 ` [PATCH 1/1] ice1712: check if snd card loaded, if not do not proceed Takashi Iwai
     [not found]   ` <CAKs1uqwYkz6OA4si8dsRicVg-tn530QhJAhacmaW1e74REQQdA@mail.gmail.com>
2014-07-14  8:59     ` 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=1405052377-3096-1-git-send-email-kostaslinuxxx@gmail.com \
    --to=kostaslinuxxx@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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