The priv_data is allocated again here wrongly, and it is not set to the driver data after assignment. This make the pdata->dev is NULL and oops occurs on the first call to hsw_volume_put.
The resource has been allocated in driver probe callback hsw_pcm_dev_probe, so here just remove this sencond allocation is OK.
Signed-off-by: Jie Yang yang.jie@intel.com --- sound/soc/intel/sst-haswell-pcm.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c index 21f1316..bc02a6e 100644 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c @@ -866,7 +866,6 @@ static int hsw_pcm_probe(struct snd_soc_platform *platform) dev = platform->dev; dma_dev = pdata->dma_dev;
- priv_data = devm_kzalloc(platform->dev, sizeof(*priv_data), GFP_KERNEL); priv_data->hsw = pdata->dsp; priv_data->dev = platform->dev; priv_data->pm_state = HSW_PM_STATE_D0;