projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f55532a
)
ASoC: rt298: fix null deref on acpi driver data
author
Vinod Koul
<
[email protected]
>
Thu, 12 May 2016 04:08:49 +0000
(09:38 +0530)
committer
Mark Brown
<
[email protected]
>
Thu, 12 May 2016 14:25:58 +0000
(15:25 +0100)
ACPI driver data can be NULL so we need to check that before
dereference the driver data.
Signed-off-by: Senthilnathan Veppur <
[email protected]
>
Signed-off-by: Vinod Koul <
[email protected]
>
Acked-by: Bard Liao <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/codecs/rt298.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/rt298.c
b/sound/soc/codecs/rt298.c
index f0e6c06e89ac0448afd7580245353b12acbb3d4f..52aacb1d5e4cab2c1b1d788d40ae29a186d7c832 100644
(file)
--- a/
sound/soc/codecs/rt298.c
+++ b/
sound/soc/codecs/rt298.c
@@
-1184,7
+1184,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;
}