From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE812CC6B30 for ; Thu, 15 Oct 2026 01:49:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L0eyot6xblKY3b19iHuxc57UlnkBl9gu8D6AUYdHM1Y=; b=cRjs7/DZ9JsvG/ 2mIsJsicHdnp2JTl6adij6gG250ajUYbtsW4SkvBD/0pnWiYhZNMHyUvEpmUGEBvLFHgwr0MK73Ih nyWeWKpgcU9pooIOOS+QTJAyMi10XMclbp7ARY75RitJ2+Ay+7KzkB+fDA71xKGspcxmX1UitpEW4 rrDD8FTXqqUCkB/f4taOqb1SrZ0065XYpXGHHFOOk6uxRvh1wLwPqkND4axoGEK787Wl2B8+MxcN4 /r7YGMmULaDZM8atX5nPVeLXXynRUERm5orPF7uNszXGmxY/FL9DvX/rgy6xzVkOKzlH4bHXRMmij I2fDSd6RLT/hI/Vu1/ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAai-0000000GcIw-1Uzx; Thu, 15 Oct 2026 01:49:08 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAae-0000000GcHa-1VEk for linux-rockchip@lists.infradead.org; Thu, 15 Oct 2026 01:49:06 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-2e812e2b31bso26934695ad.3 for ; Wed, 14 Oct 2026 18:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028943; x=1792633743; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M1jbxv0B573E/6JvVMqt4p2dOdYoex1i5fkYQYaL9us=; b=WrtVhj+uYO39e3W0Uy6yrFcE/V4tH8aS19ZKT+5OkuPLw2BlSsLmSAL7ulG9dBG93e t7JT+5IfnYnoHzggKovQHBgSno55raJAEduhv0U9vJUGbNObycLW9/tvg48hWXTbdpyn JV8aYeuaeGUoJFOrcFY7/n/CP48NbFk/KvtisPEKTIjhl5YEoLH7zWSg56m0b0RVbj9+ 8ZNJbte3X+bcseVaiOEApC1tU6Ao8EqMDaS+S219H/31ViTqZd0Z0RjwXJM++E/OfdiM AJ1jGbWlp0GPt3VcjqQmjWPxZpHm+uLRUZ+p/ZtuiV2ltviTOK/GIZuzu7SwhUGj9UP6 Eg/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028943; x=1792633743; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=M1jbxv0B573E/6JvVMqt4p2dOdYoex1i5fkYQYaL9us=; b=V2vrAmoly06tDWLiPtz9TMGpoGcQEkaU7UyHM8IeXzMbg3JTLHJSKjX7b06nm22jaE Ub4qqng7yY+CN+CAetuEsbw5PeD3xgfB1qg66S5PrkJcgGej7iL0PUTuy9pfEyf1yVP0 PE+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21DXx 9NJKSXuRhKlOKpFK0qLCu8AS X-Received: by 2002:a17:903:41cf:b0:2dd:7a0d:e51d with SMTP id d9443c01a7336-2e842ab64f2mr171051285ad.16.1792028943557; Wed, 14 Oct 2026 18:49:03 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.48.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:49:02 -0700 (PDT) From: phucduc.bui@gmail.com To: Vijendar Mukunda , Venkata Prasad Potturu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , povik+lin@cutebit.org, Claudiu Beznea , Andrei Simion , Nicolas Ferre , Alexandre Belloni , David Rhodes , Richard Fitzgerald , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Cezary Rojewski , Peter Ujfalusi , Bard Liao , Kai Vehmanen , Pierre-Louis Bossart , Kuninori Morimoto , Geert Uytterhoeven , Magnus Damm , Biju Das , Lad Prabhakar , Heiko Stuebner Subject: [PATCH v2 18/25] ASoC: imx-pcm-rpmsg: Fix imx_rpmsg_pcm_close() being skipped on rollback Date: Thu, 15 Oct 2026 08:43:17 +0700 Message-ID: <20261015014324.5569-19-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261015014324.5569-1-phucduc.bui@gmail.com> References: <20261015014324.5569-1-phucduc.bui@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261014_184904_402227_EDDFB6EA X-CRM114-Status: GOOD ( 11.90 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, wangdicheng , Kees Cook , Sang-Heon Jeon , Pengpeng Hou , Bo Shen , Neo Chang , linux-rockchip@lists.infradead.org, bui duc phuc , Chris Bainbridge , Charles Keepax , linux-sound@vger.kernel.org, u.kleine-koenig@baylibre.com, Zain Aboobacker , Bjorn Helgaas , Md Shofiqul Islam , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , patches@opensource.cirrus.com, Linus Walleij , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Vinod Koul , asahi@lists.linux.dev, Chancel Liu , Hemanth Selam , linuxppc-dev@lists.ozlabs.org, Syed Saba Kareem Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: bui duc phuc snd_pcm_hw_constraint_integer() may return 1, which is then returned from imx_rpmsg_pcm_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 3c00eceb2a53 ("ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg") Reviewed-by: Chancel Liu Signed-off-by: bui duc phuc --- sound/soc/fsl/imx-pcm-rpmsg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c index 7086fb7fc1eb..85b7c929a28a 100644 --- a/sound/soc/fsl/imx-pcm-rpmsg.c +++ b/sound/soc/fsl/imx-pcm-rpmsg.c @@ -269,7 +269,13 @@ static int imx_rpmsg_pcm_open(struct snd_soc_component *component, info->stream_timer[substream->stream].substream = substream; timer_setup(&info->stream_timer[substream->stream].timer, imx_rpmsg_timer_callback, 0); - return ret; + + /* + * ASoC only marks the component as opened when .open() returns 0. + * Since snd_pcm_hw_constraint_integer() may return 1, explicitly + * return 0 to ensure .close() is not skipped on rollback. + */ + return 0; } static int imx_rpmsg_pcm_close(struct snd_soc_component *component, -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip