From patchwork Tue Nov 4 06:45:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jie, Yang" X-Patchwork-Id: 5223241 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 828DAC11AC for ; Tue, 4 Nov 2014 06:45:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6A3220160 for ; Tue, 4 Nov 2014 06:45:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BEAE32012B for ; Tue, 4 Nov 2014 06:45:31 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A62AE26061E; Tue, 4 Nov 2014 07:45:30 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id A9FF42605EB; Tue, 4 Nov 2014 07:45:19 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3DDF22605EB; Tue, 4 Nov 2014 07:45:18 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 02C6C2605F2 for ; Tue, 4 Nov 2014 07:45:05 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 03 Nov 2014 22:45:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="410989143" Received: from keyon-u1310.sh.intel.com ([10.239.13.7]) by FMSMGA003.fm.intel.com with ESMTP; 03 Nov 2014 22:36:37 -0800 From: Jie Yang To: broonie@kernel.org Date: Tue, 4 Nov 2014 14:45:24 +0800 Message-Id: <1415083524-22756-1-git-send-email-yang.jie@intel.com> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, liam.r.girdwood@intel.com Subject: [alsa-devel] [PATCH] ASoC: Intel: Fix the driver data not set issue X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;