Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3939337pxj; Mon, 21 Jun 2021 09:48:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqQD1hBoXIEbKVBQgBxSJEywE7a8qpiyOCHi2t0+2H9Ap/yBSrnbD2SI2GQQmfsut7BPa8 X-Received: by 2002:a05:6638:2707:: with SMTP id m7mr18535175jav.66.1624294093291; Mon, 21 Jun 2021 09:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294093; cv=none; d=google.com; s=arc-20160816; b=yE9YDMmmFrhM8RdZqBkWh/IeluRbDkI7JzrXTe/Ixz0ajvEMvWpKpL61T1iXNiWBL6 zJ1n06uGOtHBom5yewx5eGw3o8KEP+7pahqvxe4/1TVyLI/ZZQwxtcfOS/nNqOHOi9Co cYKs6Fq2x7yJWeePPnDxuTlyv0xopXMmN/4nE/7VEkwZkmY4c1cOeU3c4mybvWlJxF+c x3gP6xvNlaD14dIW2y3ftoqFHH0o2gYfKRpYPclefLGW3ZSpOHemrjerCejYVizeM4jT dxeVVeZIHhNDFsAH6JO6zCidDsG7U5fR+PyRQpHHk+1tgyz+JAcaedrrYgPXqDjk/Hg+ kvfw== 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=URzM2EOjrXPjLwNuCYadAEq60XZ1+e/rub1FO9es5ZQ=; b=0/Gl5cBYfkrzLEaYfD4Wyi6OfB7LfPwEpS0Lvh/98O4D7g5nAtTIO+eU38QTAswiU2 l68mZdr4fA3aTANknISQb8xMAB5cTVRMsVcr0BUgIRvMCNlqCBmVmqjr4cqG4oo6x8fH BeDL/tBmQZi+Yr8hMX7Q6BDwJdwrOLnPGPvxlhg0bqGXeMIitwq/Pt1mjTaxfZJdTP+A 2ArqVIlm/3L918feELsyzm6ObON465dqs9Fl8/ytG746HeKDY2twJRwmGNbO38ty21VK EEQGybifDv0IiooGCte++wYSywpviWtVlkwcPJ3M8spQnse3yaYqTSW1sfbXcTQ6ZKMF UsRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AmpHHVQE; 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 m2si16177172ilu.120.2021.06.21.09.48.00; Mon, 21 Jun 2021 09:48:13 -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=AmpHHVQE; 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 S232942AbhFUQs4 (ORCPT + 99 others); Mon, 21 Jun 2021 12:48:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:37672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233339AbhFUQoI (ORCPT ); Mon, 21 Jun 2021 12:44:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B09D61454; Mon, 21 Jun 2021 16:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293135; bh=NtMKHikNEMchJUzwx8CdjNO3tpRArTcGzKU5NJGU3j4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AmpHHVQEn1MOOPwqJTUkENTX7RF4EREed8WeTxollO7wSDuv2PiNmy58zqZQlwG5c BwKX8mSDMZ3CFSq0SA1kjevolZgDZ97IxtSdRtHdfDJajFaXjk3ul/Oaxhd2JOuqEB dHoW9usetEe4gIeRE6GPrBd2FV73BC1CHi7umC0A= 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.12 094/178] ASoC: fsl-asoc-card: Set .owner attribute when registering card. Date: Mon, 21 Jun 2021 18:15:08 +0200 Message-Id: <20210621154925.935754006@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 f62f81ceab0d..9dcbe5d5a428 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -732,6 +732,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