Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3926201pxj; Mon, 21 Jun 2021 09:31:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmjxddfvqG8eRWobktY2h1VbffTy5vVFH/Y49J00iUq3PcRIi2MuhjBTST+JhQpY6IBs59 X-Received: by 2002:a05:6638:2707:: with SMTP id m7mr18469066jav.66.1624293082000; Mon, 21 Jun 2021 09:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293081; cv=none; d=google.com; s=arc-20160816; b=zNhWcc5P5gafd9fiXkPhrZFHHhpAp+aaOkJ7BiqkjynNCjztJsKl4pz87CF5bc+ZMb 46Y8ckKVrIhOPECGWDHUyql8+pcsabrPo1Y1nMcKSY19zGSwFps2/UXip7zKbPeV2/Kp gMJvCgrMvRoxl9LLlm6C60Gc7GwuQdQdshGlcT3TdADeIDRIilB9ytWrUayZAdWgbAvE J6Nbyssq7DOSK4EUIjtCcUmOtNE8GWueL6W6feZiLtEIlTYfkx3SsQ0/S0XO9jRFsV3+ f69NQJ4Y6b+FRXjBeyr9z3391BXnZnf95a+bENgV5BhTHltuc/B80uyp1gwdVyWvJn4+ H/pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DORV7i5g6vune0cUsnXPqGjiH/8yvh3uQyzbFB9L4fU=; b=fmldLC+jdY4mhXrs6bRgsz22aAZBdz1VYXvAhz0nGuwLkQmVWYffPat0NY1rktB2Tl zh/iqZbnZ2oGNjaUP9D9L6gjpYBeBFRbtzmULRchpEPWuxcAseLFRdBroj5sWcYkWuXM HQZG2M/XwFqLqDEw5VgtF34Qttdyrkw53M3b2WHpPmrN3RTuhOddp4qVCrOuovRkX/w1 Yjyf34ayo5TMWHlh4NRgAs9U92cZiPtBgCnS4Dr+pvQuwA8wbaOmcxQztVR5wRAQKVD5 FuYeuT2NsZQDjIWtzgahwAhOgrq8Cb1TN5Yb9dwm2qSb59T/otmkS4zLrwuojfu4UAUE A9Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sPqWi7/8"; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si14908468ilu.5.2021.06.21.09.30.47; Mon, 21 Jun 2021 09:31:21 -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=@linuxfoundation.org header.s=korg header.b="sPqWi7/8"; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbhFUQcV (ORCPT + 99 others); Mon, 21 Jun 2021 12:32:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232512AbhFUQ3l (ORCPT ); Mon, 21 Jun 2021 12:29:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D900460FF4; Mon, 21 Jun 2021 16:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292672; bh=EheN55RV15pxgeIQu4DP1PTRSoQC4OUgOyikc4uj/g8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sPqWi7/8k6WZNFsYntgkEAxxksLiNmDVlMqsfpUcjNk0jTHtsIL4QK/rT/tGDe8IR 43sofCxCwmJGQFsVQ+/y2F+pY/0fzFFrsANRzGUfq22O6A9phwW5ZqiBEZJRz/pZ9P z+fCbmnU2NToJlou/w/wnP9Q/0Mq8bUDrsrPjjqI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Cavallari , Shengjiu Wang , Mark Brown , Sasha Levin Subject: [PATCH 5.10 080/146] ASoC: fsl-asoc-card: Set .owner attribute when registering card. Date: Mon, 21 Jun 2021 18:15:10 +0200 Message-Id: <20210621154916.066377134@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Cavallari [ Upstream commit a8437f05384cb472518ec21bf4fffbe8f0a47378 ] Otherwise, when compiled as module, a WARN_ON is triggered: WARNING: CPU: 0 PID: 5 at sound/core/init.c:208 snd_card_new+0x310/0x39c [snd] [...] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.10.39 #1 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Workqueue: events deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xdc/0x104) [] (dump_stack) from [] (__warn+0xd8/0x114) [] (__warn) from [] (warn_slowpath_fmt+0x5c/0xc4) [] (warn_slowpath_fmt) from [] (snd_card_new+0x310/0x39c [snd]) [] (snd_card_new [snd]) from [] (snd_soc_bind_card+0x334/0x9c4 [snd_soc_core]) [] (snd_soc_bind_card [snd_soc_core]) from [] (devm_snd_soc_register_card+0x30/0x6c [snd_soc_core]) [] (devm_snd_soc_register_card [snd_soc_core]) from [] (fsl_asoc_card_probe+0x550/0xcc8 [snd_soc_fsl_asoc_card]) [] (fsl_asoc_card_probe [snd_soc_fsl_asoc_card]) from [] (platform_drv_probe+0x48/0x98) [...] Signed-off-by: Nicolas Cavallari Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20210527163409.22049-1-nicolas.cavallari@green-communications.fr Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl-asoc-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index a2dd3b6b7fec..7cd14d6b9436 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -720,6 +720,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) /* Initialize sound card */ priv->pdev = pdev; priv->card.dev = &pdev->dev; + priv->card.owner = THIS_MODULE; ret = snd_soc_of_parse_card_name(&priv->card, "model"); if (ret) { snprintf(priv->name, sizeof(priv->name), "%s-audio", -- 2.30.2