Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2055967rdb; Tue, 3 Oct 2023 08:58:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEW6Q5Yfi6NxidHZQTbvPTdHM5X5XWvh3wxTsgoB7exIYesFY2/Igkt6GIFV5mmELkkQEc5 X-Received: by 2002:a17:90a:8584:b0:274:99e7:217e with SMTP id m4-20020a17090a858400b0027499e7217emr12502726pjn.16.1696348717160; Tue, 03 Oct 2023 08:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696348717; cv=none; d=google.com; s=arc-20160816; b=gkAKExCXc6MQVQoHIXf45Z3mAVa6Qp74ouGgZpcRj4fE0YsB9cUwIZvs3ynHprnyAu PsXpwiTK1W/ou72UkNpPKRnGQFb3LptH6HWcR5FeOeLno7vFz6MajUbrNr6ucWR0oGrR e6w3SsG1FIG19ir5udJFdrKSGbzPYXHAQ90Cf7ex9b2kZACwKfBOgNFPhiMdew98C3Mz 5dlPhEBIrpFoe7MCzDJQeJdR80nOmQnR7CvkmPW/kVaTlqF2oDCZSXRwm27t4eVOVsm3 Vwe37gsNPBMu4Sw6Ir87XSVlDYt2tsug4AH19AVGkFCoFfG7RmtV9oMYSWDRp8HpSyB3 YpdQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PC4qookZBddaQSL8mAEXhtwB0j7G/jQXkzhebpMwvoE=; fh=A7ESGAPW6WV+DCQVqmR+9L9s97lYo7gbF/gPHfKJi14=; b=XSKsXxMvL3gAKW2qmmp/zs+sT9L/gSn0VYnsDmbWGYf5QlkLv8SrOUEuRGADxbfVET yqMCA3gxmpIfE8FsSXk1AaxAD+UnN6WUJL4J2VPze/x5YrOFFaJY1i7U+NcMnsLDnUST uDURXOplWc8jzRaM4GHdc/d92n8uBDRZlottElzXQ0GT2nFasSiSV+Xta0JNheb6O/LT 4XDx5ojEBKUGQ4870LT2+i7a96IW4rhVaKTFsWDUtQFqZer532u0336RKnG6R64rKeWZ M9hwRe0xqwYY/654CuQtJQJif2Mo+ZqWRk5OngSSr3rWZwLnC77Wod9asinSX/Kz0dzg Fhyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fv5IC0Ni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q1-20020a17090a2dc100b002747b95c23bsi10178430pjm.110.2023.10.03.08.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 08:58:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fv5IC0Ni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2422C8197EBC; Tue, 3 Oct 2023 08:58:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239244AbjJCP6f (ORCPT + 99 others); Tue, 3 Oct 2023 11:58:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232085AbjJCP6e (ORCPT ); Tue, 3 Oct 2023 11:58:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AF0CB0; Tue, 3 Oct 2023 08:58:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7A0AC433C7; Tue, 3 Oct 2023 15:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696348710; bh=jSnludvJeJTD+6HRSvHeKr3Owfs9qfyq4PwHRjnN+QU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fv5IC0Ni/LXK242jhOeSXIVdmLaP1PNHa2ff5rEY557ruQsQ2XrOtYJY+lXFTZvYQ BeqeLL+nDvoW2Hqzqjw42JDaFgiW8Mn9C5LAr502TcMuI65HwLdqwvc4S9qr38L14R /2dz98wEOYOrRLMwMNRKePniaI1SVUxLkE6cMMrv7/mt4QEITny1+u8lfLuHHc5JAH 9xAZC+oI2Z5k3pDnFNsL2B3kVawS+d0QkAKb1DdNlnhHrLNo+e5JE0bG+V5MNUIf20 vPl0Ir9AgYatkGTkfqLCmz4k3uFXd264wMgwb48y/RSwdIYXXu25yfa3PbSqKXVYQt +OX/hK+7QQbBQ== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qnhnG-00074p-0B; Tue, 03 Oct 2023 17:58:42 +0200 From: Johan Hovold To: Mark Brown Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Srinivas Kandagatla , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 2/7] ASoC: codecs: wcd938x: fix unbind tear down order Date: Tue, 3 Oct 2023 17:55:53 +0200 Message-ID: <20231003155558.27079-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003155558.27079-1-johan+linaro@kernel.org> References: <20231003155558.27079-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 08:58:36 -0700 (PDT) Make sure to deregister the component before tearing down the resources it depends on during unbind(). Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver") Cc: stable@vger.kernel.org # 5.14 Cc: Srinivas Kandagatla Signed-off-by: Johan Hovold --- sound/soc/codecs/wcd938x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index cf1eaf678fc2..c617fc3ce489 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -3504,10 +3504,10 @@ static void wcd938x_unbind(struct device *dev) { struct wcd938x_priv *wcd938x = dev_get_drvdata(dev); + snd_soc_unregister_component(dev); device_link_remove(dev, wcd938x->txdev); device_link_remove(dev, wcd938x->rxdev); device_link_remove(wcd938x->rxdev, wcd938x->txdev); - snd_soc_unregister_component(dev); component_unbind_all(dev, wcd938x); } -- 2.41.0