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:
07961ac
)
ASoC: Samsung: return error if drvdata is not set
author
Prathyush K
<
[email protected]
>
Tue, 2 Apr 2013 11:23:01 +0000
(16:53 +0530)
committer
Mark Brown
<
[email protected]
>
Wed, 3 Apr 2013 16:56:43 +0000
(17:56 +0100)
This patch fixes a possible crash in case drvdata for the secondary
device is not set.
Signed-off-by: Prathyush K <
[email protected]
>
Signed-off-by: Padmavathi Venna <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/samsung/i2s.c
patch
|
blob
|
history
diff --git
a/sound/soc/samsung/i2s.c
b/sound/soc/samsung/i2s.c
index d7231e336a7c678e4b8b5f86ef0efa4a2eb04e8a..f1fc064195600e5a56a0dbcaee0196ecf6f11544 100644
(file)
--- a/
sound/soc/samsung/i2s.c
+++ b/
sound/soc/samsung/i2s.c
@@
-1107,6
+1107,10
@@
static int samsung_i2s_probe(struct platform_device *pdev)
if (samsung_dai_type == TYPE_SEC) {
sec_dai = dev_get_drvdata(&pdev->dev);
+ if (!sec_dai) {
+ dev_err(&pdev->dev, "Unable to get drvdata\n");
+ return -EFAULT;
+ }
snd_soc_register_dai(&sec_dai->pdev->dev,
&sec_dai->i2s_dai_drv);
asoc_dma_platform_register(&pdev->dev);