Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp415427ima; Wed, 6 Feb 2019 02:11:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ1IzRh19j0+KSuFI3G93sWfnKU6zqCAP+W86rQe/eFCE2jDzs8T31QnCcS+cQ1MLg4TuKc X-Received: by 2002:a62:1c0a:: with SMTP id c10mr9721654pfc.213.1549447866598; Wed, 06 Feb 2019 02:11:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549447866; cv=none; d=google.com; s=arc-20160816; b=ktVwqPi6YEB6hIwxYhD7230xqHKdwpeplD2MZPMdko6fC1tpR4oBNEKaPMtVTTr45n n8Y8twe2XOmoB+RtaCv5dwHRmrmInU1jhwTB9b30Zfa2Ye+ZE8V+rehV9DViTHv1yiW+ NsWiBsFeM7FKjiV0mkgiEgYX0k6Jd1SQvXfHtJMauesUENYMeTc5k3qiP0L/IowQL028 Jh8u8lCznFRpPmCKTwEIkLoTBp1lWdc6Ltlh1MhLtguHeXISsJTeypIaMGa35e4lcpjk F27jZIb6g8oskzlxxJSTfynlGtOp1KdrTGQs1mceAryrbDLwilvclESOXhlSSnigEXU4 TIqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fIiDciExLJThzBZLNlaVwy2Peh8J0Zek5yXpY3qRKdE=; b=bYu9FVMLHK9GMS7NxdN0tLSTuhFnjh12XrjlMLLlwXQzTz35lyUXc1LIR3Kr+yWZdA LkkfkQRUv1kk21fN5VJ12gXJeIY/F/vUU5IFjv34r3r2/pmzY3lhWwLuuZoBVostdmXq 71JZYqiC0MsJ9E1Qvpu7tZp0rC908VfwqJ3uN3mfhUR4wbb1ui9QAl8iVzggDJn6MQeK SwG6M7i3gFCj8Q8hRN4FkSeE0jaqp5YEwaka5B5JABGW/LT0BvCHVFYQvcX6DWwAhS6t g+/TlTZD9L1IlUpPPK9fZx8fwVpdOznehgfLE7egaPqBcIH3HgvHTWzfnIc2tsqsC5bL 1DsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si5502855pfk.35.2019.02.06.02.10.50; Wed, 06 Feb 2019 02:11:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728963AbfBFKGi (ORCPT + 99 others); Wed, 6 Feb 2019 05:06:38 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:58218 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbfBFKGh (ORCPT ); Wed, 6 Feb 2019 05:06:37 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x16A3tfV003010; Wed, 6 Feb 2019 04:05:51 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail3.cirrus.com ([87.246.76.56]) by mx0b-001ae601.pphosted.com with ESMTP id 2qfp68rkf2-1; Wed, 06 Feb 2019 04:05:51 -0600 Received: from EX17.ad.cirrus.com (ex17.ad.cirrus.com [172.20.9.81]) by mail3.cirrus.com (Postfix) with ESMTP id E0EA3611C8BB; Wed, 6 Feb 2019 04:05:58 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.408.0; Wed, 6 Feb 2019 10:05:50 +0000 Received: from imbe.wolfsonmicro.main (imbe.wolfsonmicro.main [198.61.95.81]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id x16A5nik007087; Wed, 6 Feb 2019 10:05:49 GMT Date: Wed, 6 Feb 2019 10:05:49 +0000 From: Charles Keepax To: Sylwester Nawrocki CC: Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , , , , Marek Szyprowski Subject: [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked Message-ID: <20190206100549.GO3837@imbe.wolfsonmicro.main> References: <20190205211622.GA5891@kozik-lap> <844c3f34-f7db-6b26-169a-994922367c78@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <844c3f34-f7db-6b26-169a-994922367c78@samsung.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=781 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902060080 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DAIs linked to the dummy will not have an associated playback/capture widget, so we need to skip the update in that case. Fixes: 078a85f2806f ("ASoC: dapm: Only power up active channels from a DAI") Signed-off-by: Charles Keepax --- Ok so that all makes sense, this patch is probably the best fix? Thanks, Charles sound/soc/soc-dapm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 482ddb825fb59..5235d8828758a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2570,6 +2570,9 @@ static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream, else w = dai->capture_widget; + if (!w) + return 0; + dev_dbg(dai->dev, "Update DAI routes for %s %s\n", dai->name, dir == SNDRV_PCM_STREAM_PLAYBACK ? "playback" : "capture"); -- 2.11.0