Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1288546pxb; Fri, 24 Sep 2021 00:45:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzwX3ZmqCeFMr8+SMaeQArX6YbbeGwzeyGUXTb4INFCk8vIofUyB9mJDtXqFnqpTI+7+Pz X-Received: by 2002:aa7:d850:: with SMTP id f16mr3469595eds.176.1632469522651; Fri, 24 Sep 2021 00:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632469522; cv=none; d=google.com; s=arc-20160816; b=Ti+n5YtMr5McBRf+8ebtF+GFUYuW39PNjyT01f3kGLVKqr2NRKvWhv9WL5/ZVfA7Qq LbbiBwuGSvh7xjfLDBjlk5Bv267PEbxpiaCiWTBcSnRQQbTici0eXfo9Z/TUp5FUZ+7L kQzkc6NZX8BNBw2g/XJTdjE+hGbSL8/p4T81lrbrU/tDbTuAFLnmkxjaQYhzIKPpCuzS ZjxU6B8+N8PtTub6RGAKjKCy41gzfu4Q5Vb3T+Ylt6IVK+WxVNVSUQe0BoNa4PAZaPAO hamBYi22/lZdfB3VVvXmcQUDO+5QyEHiYa9azUTZRH9MGYYzmDrdqfdKPChEK4zpXCfj /oKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=BBAd8fkMceztBjAtolBY+N3vN1kqGZCk7vffXjVFyyw=; b=m7upDwFVwvPL2liDrHmNkiAg3fFWirY6+tyUo52Nc6L679hxAOxCxaGZdIau0viIFN Wu+i3s7ves3xfBC0TsQb9mt/qC5XDs4mD2PCPDq1b9jA1CSHDGXqBgxSj1iueOx0vSih wfTNybW5IddSwi8UwtBQLI94eS0zM/wj6fbI6X7LCS7PWT6DRQ15wJpIg7w86535q2Un HSyQHlYyTcdlAWkOkkg6hIfXFK+Ul8qTFC7tBcMls5Gz/W0dKxFPI/CgIs1EhPCGNHDz 0AWBKWlextM+LHg7XBXy9e/tsq7f5mbht7jU5Snlk7gAsfWHNwdL5R+fBdRlg4miWjZE JSdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lI4AkeDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s2si7998149edy.454.2021.09.24.00.44.58; Fri, 24 Sep 2021 00:45:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lI4AkeDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244428AbhIXHoC (ORCPT + 99 others); Fri, 24 Sep 2021 03:44:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244368AbhIXHoA (ORCPT ); Fri, 24 Sep 2021 03:44:00 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7361C061574 for ; Fri, 24 Sep 2021 00:42:27 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id t28so11125350wra.7 for ; Fri, 24 Sep 2021 00:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=BBAd8fkMceztBjAtolBY+N3vN1kqGZCk7vffXjVFyyw=; b=lI4AkeDOM+xZJOobC3Y+DWU/frUKH2+B93ekBGI50eraV0g9q691WSkzujuEP0nHqL 5WTxxpIdsIcax7M0QAOXdhFIHs70HhDapuBbGGOcK2ddRxo7xWA2FfAPXrVpfZYUzzHz nAjiN5pgphtzYdNU93GJu8+w4kjHUCg2LVAHoWHH9SuboXixA3T/+BGoUF7WGZRXDsyG SVytETOVISme8eQwc9As1u31cbb2fOFIjshRPhz22cJKeYzyFZQfCgfOR5fQzgcpvzPp UdrWOLEflGAWeKzepSyEDYIpqBlMz4pblDZOs8xCfYDgXtVfC0nvReG97sAzAo88gUNk Uz0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=BBAd8fkMceztBjAtolBY+N3vN1kqGZCk7vffXjVFyyw=; b=b3mfROLYxC0QeHaS0MDXt1aoEoDAbIHXensgFeuZhwSWx4JHkFU7+b7EGuds3kP+p+ tvitr2CkmXMPPL22AMK2tyKW4zHLKU6MOkxBfzVtLzm/dpDTYzDxB8SSs7Ihz1F7PInd fBUuTIcc6bg/KWCe4t/kFbA92XYHzvTEbR/Zi2Myegu1TqlnO9ezra18fpUIImDlANuY /rZvrWQmadL3xwCO91T0M7RMfFeyAILsnYzMj0lyxv897ruRj/aK7m2NG4a+ab/tXJGb 1eIzF7XrDUbxSB6ZcTB3VVFoqEhVAeKhKLp9RTsLaow83t8WCHvcStCV04SNy+S4xKxZ rZuQ== X-Gm-Message-State: AOAM530n+cqtsDH+MWrsduCHUgsNbt+OO95UdQgJTYQyCaYyxU3OE7hS Jh4KLQDwnWXf13BiwUeNumA+f10J+dAWdnGDGxW3SkUn X-Received: by 2002:adf:e649:: with SMTP id b9mr9775010wrn.309.1632469346307; Fri, 24 Sep 2021 00:42:26 -0700 (PDT) MIME-Version: 1.0 References: <20210917143659.401102-1-daniel.baluta@oss.nxp.com> <20210917143659.401102-11-daniel.baluta@oss.nxp.com> <203bf6cd-6407-f01d-52c3-e399d06cb3f6@linux.intel.com> In-Reply-To: From: Daniel Baluta Date: Fri, 24 Sep 2021 10:42:13 +0300 Message-ID: Subject: Re: [PATCH v2 10/12] ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC To: =?UTF-8?Q?P=C3=A9ter_Ujfalusi?= Cc: Pierre-Louis Bossart , Daniel Baluta , Mark Brown , Linux-ALSA , Kai Vehmanen , Liam Girdwood , Linux Kernel Mailing List , Ranjani Sridharan , Guennadi Liakhovetski , Daniel Baluta Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23, 2021 at 4:04 PM P=C3=A9ter Ujfalusi wrote: > > > > On 23/09/2021 15:58, Pierre-Louis Bossart wrote: > > > >>> +static struct sof_ipc_dai_config *hda_dai_update_config(struct snd_s= oc_dapm_widget *w, > >>> + int channel) > >>> { > >>> + struct snd_sof_widget *swidget =3D w->dobj.private; > >>> struct sof_ipc_dai_config *config; > >>> struct snd_sof_dai *sof_dai; > >>> - struct sof_ipc_reply reply; > >>> - int ret =3D 0; > >>> > >>> - list_for_each_entry(sof_dai, &hda_stream->sdev->dai_list, list) { > >>> - if (!sof_dai->cpu_dai_name) > >>> - continue; > >>> + if (!swidget) { > >>> + dev_err(swidget->scomp->dev, "error: No private data for = widget %s\n", w->name); > >> > >> NULL pointer dereference, just return NULL without the print. The call= er > >> is printing anyways. > > > > yes good catch, we need a v3 with the fixes suggested by Peter in > > https://github.com/thesofproject/linux/pull/3171/ applied. > > Only the second patch in the PR is applicable for upstream, but it > should be squashed in for v3. Thanks Peter, will squash this in and send v3.