Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: rt298: fix null deref on acpi driver data
@ 2016-05-12  4:08 Vinod Koul
  2016-05-12  4:08 ` [PATCH 2/2] ASoC: rt298: Add DMI match for Broxton-P reference platform Vinod Koul
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vinod Koul @ 2016-05-12  4:08 UTC (permalink / raw)
  To: alsa-devel
  Cc: patches.audio, liam.r.girdwood, Vinod Koul, broonie, Bard Liao,
	Senthilnathan Veppur

ACPI driver data can be NULL so we need to check that before
dereference the driver data.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/codecs/rt298.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index 68cf8d5a174f..45dc5fa24961 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -1179,7 +1179,7 @@ static int rt298_i2c_probe(struct i2c_client *i2c,
 
 	/* enable jack combo mode on supported devices */
 	acpiid = acpi_match_device(dev->driver->acpi_match_table, dev);
-	if (acpiid) {
+	if (acpiid && acpiid->driver_data) {
 		rt298->pdata = *(struct rt298_platform_data *)
 				acpiid->driver_data;
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-13  7:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12  4:08 [PATCH 1/2] ASoC: rt298: fix null deref on acpi driver data Vinod Koul
2016-05-12  4:08 ` [PATCH 2/2] ASoC: rt298: Add DMI match for Broxton-P reference platform Vinod Koul
2016-05-12  5:59   ` Bard Liao
2016-05-13  7:59   ` Applied "ASoC: rt298: Add DMI match for Broxton-P reference platform" to the asoc tree Mark Brown
2016-05-12  5:59 ` [PATCH 1/2] ASoC: rt298: fix null deref on acpi driver data Bard Liao
2016-05-13  7:59 ` Applied "ASoC: rt298: fix null deref on acpi driver data" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox