Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1185362 > unrolled thread

[PATCH 3.19.y-ckt 078/251] ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card

Started byKamal Mostafa <kamal@canonical.com>
First post2015-07-16 04:10 +0200
Last post2015-07-16 04:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.19.y-ckt 078/251] ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card Kamal Mostafa <kamal@canonical.com> - 2015-07-16 04:10 +0200

#1185362 — [PATCH 3.19.y-ckt 078/251] ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card

FromKamal Mostafa <kamal@canonical.com>
Date2015-07-16 04:10 +0200
Subject[PATCH 3.19.y-ckt 078/251] ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card
Message-ID<pMGMy-11H-13@gated-at.bofh.it>
3.19.8-ckt4 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Peter Ujfalusi <peter.ujfalusi@ti.com>

commit 80ba2669ec8c3e6517aa935001f6cb8809bf3df4 upstream.

If the card is not part of any card the tas_data->codec is NULL since it is
set only during snd_soc_codec_driver.probe, which is not yet called.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/soc/codecs/tas2552.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index ae23acd..a073dc9 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -120,6 +120,9 @@ static void tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown)
 {
 	u8 cfg1_reg;
 
+	if (!tas_data->codec)
+		return;
+
 	if (sw_shutdown)
 		cfg1_reg = 0;
 	else
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web