ASoC: pcm3008: Check for platform data
The driver will crash if none is provided. Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
d7f184958e
commit
33319a2fcc
|
@ -92,6 +92,9 @@ static int pcm3008_codec_probe(struct platform_device *pdev)
|
||||||
struct pcm3008_setup_data *setup = pdev->dev.platform_data;
|
struct pcm3008_setup_data *setup = pdev->dev.platform_data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!setup)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* DEM1 DEM0 DE-EMPHASIS_MODE
|
/* DEM1 DEM0 DE-EMPHASIS_MODE
|
||||||
* Low Low De-emphasis 44.1 kHz ON
|
* Low Low De-emphasis 44.1 kHz ON
|
||||||
* Low High De-emphasis OFF
|
* Low High De-emphasis OFF
|
||||||
|
|
Loading…
Reference in New Issue