Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC08DC433ED for ; Thu, 1 Apr 2021 16:04:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5376861375 for ; Thu, 1 Apr 2021 16:04:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5376861375 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8E9A416A4; Thu, 1 Apr 2021 18:03:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8E9A416A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1617293085; bh=MfZrhP1Y+78+utotX8wMFzIdsZqpXU/KCv70sKCiYV4=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dpuOn0bdVqtXMFDdrcxjceCt+haUfNtGL3HIijPDR8z0peJi061dexNoSZE3gqi3v Ypb01HpOTmjOPIfmx5c9IU/K55Eq0ShVSl0J1S/pt0SeyLr8nkquYoX/ROQkQpkkZj v+M5TgQmIyu0aYtm3o5lVl3r6sE/FMznOOpLFTvI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 12B52F80272; Thu, 1 Apr 2021 18:03:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D0C00F8013C; Thu, 1 Apr 2021 18:03:53 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 28AF6F8013C for ; Thu, 1 Apr 2021 18:03:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 28AF6F8013C IronPort-SDR: eJ5TEfTtn1v9FYPBq2hOCJUCTTK6JGzuSDngi8sAzVzdO10izo90FfWnhX5n1VtKRp/YSxmMAK NjBjekvHulvg== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="171692978" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="171692978" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 09:03:20 -0700 IronPort-SDR: 72C3Wd8VzEv1rKIMk9QywCU1PmokvTgQL5VxGjUpjtLwURP/BE+pIcIeNiUySjKOgaFl60ueS4 4yj/m7NdYN6Q== X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="439265752" Received: from mooreale-mobl.amr.corp.intel.com (HELO [10.255.229.43]) ([10.255.229.43]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 09:03:16 -0700 Subject: Re: [PATCH] soundwire: intel_init: test link->cdns To: Vinod Koul , Bard Liao References: <20210331010250.14151-1-yung-chuan.liao@linux.intel.com> From: Pierre-Louis Bossart Message-ID: <6dae2b2d-b482-4e29-4543-62126780725c@linux.intel.com> Date: Thu, 1 Apr 2021 09:31:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: alsa-devel@alsa-project.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, hui.wang@canonical.com, sanyog.r.kale@intel.com, rander.wang@linux.intel.com, bard.liao@intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 4/1/21 2:21 AM, Vinod Koul wrote: > On 31-03-21, 09:02, Bard Liao wrote: >> intel_link_probe() could return error and dev_get_drvdata() will return >> null in such case. So we have to test link->cdns after >> link->cdns = dev_get_drvdata(&ldev->auxdev.dev); >> Otherwise, we will meet the "kernel NULL pointer dereference" error. > > This fails to apply for me probably a dependency on the auxiliary bus transition?