From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org>
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 D881DC43458
	for <linux-arm-kernel@archiver.kernel.org>; Fri, 10 Jul 2026 08:54:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help
	:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:
	MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:
	Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From:
	Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
	bh=04rpi8Qi0ASHQrqKFAWwcdZ+O/U1M86p5o7kV03aHOQ=; b=ujYEsbaIXF1NXucdFBKGBUSebi
	i1RUPEHYVu3su7Z8oGvxDuA62cgTdSenuyiQvAFqGWwLWBtxmES4a8S4t7V/9TTZYXH2w7ErxBV8E
	7SenWMDasH5vUFNHwOhmyM+HISVhGjtqMJjcXgsw+zp+Sj/PQpaXrbwYrtwPXoIiVbIlfhw+h3H64
	S9jIYA8v18Olk4vMX6PveByulQmtkTVrt+fP3DUnYOXskO1EipB6ecxegEGlAIB9J9LaZ7swjF0AU
	0MEsFnl1t2wMBBvYW2aHM0l73QKJcXXcAdJ8SMFAYpSKJvWSEIjBQfRZk6hG5ghY+7M5DzO5Fb//c
	gryvHQ6g==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zd-00000004Uyx-2E5R;
	Fri, 10 Jul 2026 08:53:57 +0000
Received: from extorris.mess.org ([92.243.27.206])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6za-00000004Uxk-1Sii
	for linux-arm-kernel@lists.infradead.org;
	Fri, 10 Jul 2026 08:53:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673630; bh=PFYYQhVg4NRarAQ81g5gFeRQ3Pkd+XUXZYeUxj9P9Kk=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=pqaVoVc+xqwi4zltj+mcYWczHgP/iJginifwqnX3TdaDGrn9Fo2biGHB4LkJUYEog
	 u2BKKbjSMb+PJvjwn8U7aD1Umnb3MtMioRxmS4T2Hs7LgdSeJZJqiwjAGKsrxzjo1t
	 XhRRdDolDRqHN/jWkkxCauK1pm5+ch5mJ4IJ3Ty5sygL4HxvpeK4StAbkIRYeosNWU
	 mUxh8khTw26WwJJVtEGoxfULdBIIbt73S+xo2JdlyqB+PMTmQqkNggOKKheYr7tG3O
	 uhb6YALZxnGWhS2siP7468iU4dOUW35VCwD0Sv82LWC6nVFari0Ne6m5zexY3n0qui
	 yE1VwSj9VYHKA==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id 5FC7240B50; Fri, 10 Jul 2026 09:53:50 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673629; bh=PFYYQhVg4NRarAQ81g5gFeRQ3Pkd+XUXZYeUxj9P9Kk=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=Q7tS2vmA86o248eMBvJZbYEhyUISrTe2nv47HVo3EBB7Wxrw/q2cjF2Q/s1a683pj
	 BoBwF+MTN5v6MmQc7WN1g5SAoqY0NzP9lX+ggsZPVjvkpArpwCtP34JWz2KigVZg4e
	 6L0xbtr9uexxKL+seFkxe6wfL9blzBpwgYSgfoEFoYy6gvzgZ3t9n0FXXuHercC8Gb
	 ArHomzEUtOdrVqrjnuDjawTYJZawhFr+ZEK3GKuww4egj8dYWc46AUqlVpofx+Ap1z
	 aJPjdLb7TV96CXOc2nFahvHojnRrNmcHsgaXzd50an5BycQdq1m405O6IWFL8/cCJK
	 Z4M3GggQWecXA==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id B556540B4C;
	Fri, 10 Jul 2026 09:53:49 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	Patrice Chotard <patrice.chotard@foss.st.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] media: sunxi-cir: Ensure no more interrupts can occur before free
Date: Fri, 10 Jul 2026 09:53:32 +0100
Message-ID: <e74a0caf91aaefaf98476a191e6489c606632bf1.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260710_015354_542344_ABD27FEE 
X-CRM114-Status: GOOD (  13.06  )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org

Only call rc_free_device() once the hardware has been stopped.

Fixes: dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq callbacks")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/sunxi-cir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
index 28e840a7e5b8..af1ee08ffdbe 100644
--- a/drivers/media/rc/sunxi-cir.c
+++ b/drivers/media/rc/sunxi-cir.c
@@ -374,8 +374,8 @@ static void sunxi_ir_remove(struct platform_device *pdev)
 	struct sunxi_ir *ir = platform_get_drvdata(pdev);
 
 	rc_unregister_device(ir->rc);
-	rc_free_device(ir->rc);
 	sunxi_ir_hw_exit(&pdev->dev);
+	rc_free_device(ir->rc);
 }
 
 static void sunxi_ir_shutdown(struct platform_device *pdev)
-- 
2.55.0



From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org>
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 E7450C44507
	for <linux-arm-kernel@archiver.kernel.org>; Fri, 10 Jul 2026 08:54:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help
	:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:
	MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:
	Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From:
	Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
	bh=j5whiZouPNkR2Hvpc1mZz6nC5ir46FUasDaZIrbl8OA=; b=th2HSKpy6C7YLCqS18fTkCAWzg
	mm9ebc/bkezEPUvj66UkjpB8dKJvI2tr8lOLrv7yNiMgynbDXqyJ05vflniXyzurP/c8gG2gQHkee
	xjvj64ZEgPH3n8fWG5yivmS238u5eaSbfe50LJYx6OucPXIj7k7oBccWyGQFSxF+ZzmoX9xSPCFj+
	Hhu4QVAqmpz0i6SKoCEp9GvBS6fUXRN463V07rVpsos6tMBvbdzWB854Her7h4K2qNeMoGL8jl7DB
	nTiWwtGBpG9KrpERsFGvxLh+hSvQAg7B9X6ybHwnKcttW7SyP4w6n0Ijf4wGOWBMzctewSYtdFQzb
	5+OuB8LQ==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zg-00000004Uzz-07Y7;
	Fri, 10 Jul 2026 08:54:00 +0000
Received: from extorris.mess.org ([92.243.27.206])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zb-00000004Uxr-3Kr1;
	Fri, 10 Jul 2026 08:53:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673632; bh=VTN1gzPokpMjTvGP+n6o0ob+YikmETxLkSiXZ9C7eUw=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=phENkU7MPN1o4o4q+GhrR+sWTZHfaaG7rtEjrwtxXJEw6Xc0Z/jjmqfiCyfXszJH2
	 ZHj5yv7eDOPW5NQ33A97lBTgqM4HjVEikHMWkcNgSDCor1JtjiSZ7OnJ9bWuiTDztH
	 uhUphM1tVqWxqx8ObKAn+kt3xRo74inmuZdVfKgGKr7dY5OTvwXo5VvV8pGc00wTD4
	 s00t86c0/hiySKLvLRkaDDfwY/lgsEEePTZk/9GPeljeQYAUJKUjorOmjgloWng9IG
	 p2NSgdoVcr4b+Vvr41Ath8FkpZAUvtS7GIhG6zIPi4IqVIwW1clcuOFNlMfU7r8ZiB
	 aJFHMrqeJA96A==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id B6CD740B5F; Fri, 10 Jul 2026 09:53:52 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673631; bh=VTN1gzPokpMjTvGP+n6o0ob+YikmETxLkSiXZ9C7eUw=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=KoybHE3BX08uWg1kOaSiOcb06STgFgg/c6NzTKAEwAzutIhvnPJmOzJbreIlvCjXf
	 xkPO37jyL/qWXvvDMRB49DtoIJX/0gpRdhtCDqdbIb54ZM8kqmHZCc4cjJlsmifIed
	 tkaNav92YSa2RzIqKRXLqJ0f0jmfnRLCtZcC7Ip53sp3bu0KraEcAVD8dzbeOjgyYx
	 fXuugaSVdsLsM3+AZZy81Y56PsYmrBd3eFjml0XxYQzGWJU3QmI2+SipUtATiKH1ay
	 kYQJU68WN+h1Ms8Fd4y48xhMej/KpkiXyBGAz69i8T0UGpeD9fQkNSpHCUmUiBkvaT
	 R0oo78uOqZrIw==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id 1378B40AF1;
	Fri, 10 Jul 2026 09:53:51 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Hans Verkuil <hverkuil+cisco@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 6/7] media: meson-ir-tx: Ensure rc_free_device() is called on unbind
Date: Fri, 10 Jul 2026 09:53:34 +0100
Message-ID: <a11dc2d089d4e288b63412a0d3029393c577ee80.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260710_015355_992083_45893234 
X-CRM114-Status: GOOD (  12.64  )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org

Make rc_dev devm managed.

Fixes: dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq callbacks")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/meson-ir-tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index e7bb107e6a84..abb107d19e8c 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -345,7 +345,7 @@ static int meson_irtx_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "irq request failed\n");
 
-	rc = rc_allocate_device(RC_DRIVER_IR_RAW_TX);
+	rc = devm_rc_allocate_device(dev, RC_DRIVER_IR_RAW_TX);
 	if (!rc)
 		return -ENOMEM;
 
@@ -358,10 +358,8 @@ static int meson_irtx_probe(struct platform_device *pdev)
 	rc->s_tx_duty_cycle = meson_irtx_set_duty_cycle;
 
 	ret = devm_rc_register_device(dev, rc);
-	if (ret < 0) {
-		rc_free_device(rc);
+	if (ret < 0)
 		return dev_err_probe(dev, ret, "rc_dev registration failed\n");
-	}
 
 	return 0;
 }
-- 
2.55.0



From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org>
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 CEECCC44509
	for <linux-arm-kernel@archiver.kernel.org>; Fri, 10 Jul 2026 08:54:06 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help
	:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:
	MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:
	Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From:
	Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
	bh=Mn4cC1hqXiGcDScmkUXYezdlXnG+b6xdlBAvd4W444U=; b=cyczXr4wr7cPIowX45dvBRQ91u
	R7XKWuRW+G8EI74TgxN+irFcGd07r3GiqNlOjnNL5/2nt7cbDTE4KNtbXtsDoi8v+O78HjhC6eV7G
	pPjcfNHzvwaG+DT0enaMhlHeaATbNCY7tqScB0mXW/20/WLvIZlF+frlZjLDBrnT6e8E/LdvxLgyu
	D3VIrsfXvuSr+WqpWOpGaMwNCcTpamvupKfbYnigqpFDVB1ao7NBpjzSknMbyVa1FZbTE0UCCR6c+
	3kcfkVZAyOGJk4jDM7l3Ynj0ELNMdojHO1VNxUBj/dmbWnxqL8vou7SgvTiKT5v3dwI8YezHkJH4a
	eQ/9ox/Q==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zf-00000004UzV-3RFJ;
	Fri, 10 Jul 2026 08:53:59 +0000
Received: from extorris.mess.org ([92.243.27.206])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zb-00000004Uxn-14NP;
	Fri, 10 Jul 2026 08:53:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673632; bh=uxrv4RU4kx2kz4TN49RM0DA9U2uRkeYrAsniJlkVWGM=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=TxIk0f6XWy5cxyaguSGDZjjYRC7Y+Sfnm6Qf0KRRImcbmbB8txi5fCzwnEMwrAjRM
	 gPRDFcKEiz7sZRk2v3j1iRNm0UguiBY2FyS2roSwQlQ8r8iZPkkVBPl7jvfjj1UFox
	 0oBJJeJMUvxlZQQpKFQJhvr0ilFjb2/3gj0hQvKc3A+xYjO3WLCg26ttfPmLT3ln1D
	 WD4BIscrD+UEps0Q5ivnWt3t/2oORyGYnLJ32azkTBO50jPdd89w297oJw/TI5l4P4
	 4Ct4XVpNQr4a7qDsY4PtNnQHbBWjRy1I1tXOXpa+jcPkgXZ7MisVGT2G/y98xQg21d
	 ds6LMXs3RfvjA==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id 3EC8E40B5A; Fri, 10 Jul 2026 09:53:52 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673630; bh=uxrv4RU4kx2kz4TN49RM0DA9U2uRkeYrAsniJlkVWGM=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=tZUyiT1pLkcDLBaxdGo1d2qyxadn8fyYS7IVBEz3BbahdiWSN+QUYHRtenYNP89I2
	 KYgLloDRAKfgjEVslrcHUezE8WYuWY429IVf0CxTYxeYMzA0bWVKE1zsqdwkDmaff+
	 eh4CHSN+Aug9p83+dc0A7H0VGvPi8CKu6DlyJoUzoGi7Pui0NjiFRPi3a9zsLYrdTh
	 eagij+o0OBCwGW8ji6MO4I0hhib/bSJGy3zVXTai5PNQBDR+A2F+hMXURTPsQZs0OJ
	 ClNKahqCN0MwhlfmHBOfuWVAfWWa4i9fNWmWfVzqXM4eoFZfoN/UJKkFyXTEOSztak
	 3hali2luY2P2A==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id 6E95140B29;
	Fri, 10 Jul 2026 09:53:50 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] media: meson-ir-tx: Ensure clock is disabled on unbind
Date: Fri, 10 Jul 2026 09:53:33 +0100
Message-ID: <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260710_015355_429911_77C45B7D 
X-CRM114-Status: GOOD (  13.15  )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org

clk_prepare_enabled() needs a call to clk_disable_prepare() on
driver unbind. Make it devm managed.

Fixes: 49be1c78d575 ("media: rc: introduce Meson IR TX driver")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/meson-ir-tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index fded2c256f2a..e7bb107e6a84 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -288,8 +288,8 @@ static int meson_irtx_mod_clock_probe(struct meson_irtx *ir,
 	if (!np)
 		return -ENODEV;
 
-	clock = devm_clk_get(ir->dev, "xtal");
-	if (IS_ERR(clock) || clk_prepare_enable(clock))
+	clock = devm_clk_get_enabled(ir->dev, "xtal");
+	if (IS_ERR(clock))
 		return -ENODEV;
 
 	*clk_nr = IRB_MOD_XTAL3_CLK;
-- 
2.55.0



From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from extorris.mess.org (extorris.mess.org [92.243.27.206])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DC083D88F0
	for <linux-media@vger.kernel.org>; Fri, 10 Jul 2026 08:53:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1783673637; cv=none; b=lcKFet9ijszeMNMJxTI046VlXLRP07BZt9vHIyKe03Dt4ZGMkUquGwMQDmyb7vHupKVWzhc+I8eIXUUcwg5+LB3/wlAw3LorZ3JuqUVFPpfVxAvUdUWtkA6piVWKtDWTEUtFFX1NMP3iN9/aJgXRocdCaAOf+f7ct0EEijlnTRI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1783673637; c=relaxed/simple;
	bh=f8X3hs3KfpHJ+ddgwbbAYYOPiPTGEV5jrh6ErK4IAGE=;
	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=foKp7sQ7q3mIy9an6ORtPOnf9TIQfkyz1llkreJeV/r7xySx8VXx+OAD2606j8wY/nhL63M5JpkpHpD01utmx7clxnNOdcyCUT4ZD004t83e5pfaIGI76jesv1Lm60GPP7UOXmpR+rlrGin2Rvm5dAcG2eQ/2km4FRCGcRQfRw8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=f//OWYUx; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=hCpNk2TS; arc=none smtp.client-ip=92.243.27.206
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="f//OWYUx";
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="hCpNk2TS"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673628; bh=f8X3hs3KfpHJ+ddgwbbAYYOPiPTGEV5jrh6ErK4IAGE=;
	h=From:To:Cc:Subject:Date:From;
	b=f//OWYUxBNawlCd6zcsomzzaxFb9AXvYhz6EOYtQ3jflHMbedDPImph25+0vEtKnq
	 FK5VPohYqzDvnhm6VSoqe47IBajmljRLZ1FPhetLPHNrYhtqyVG7D3berR6PWLnWFP
	 6Iz6Y/dSxM+5xu0u1g/S/5U8QrOw0okYbPzu1+undoHHAx1vZ1Om0GPQ3QzosJBsNP
	 Q1QJazTdx4gVRpV06gz0u8Il1Y8pM1Fb/em25zZyTK2m7bp6zQLKE0002M3YSRpmvR
	 5LJC8DIeB8K0PFuZu90jZIC3O1kKwKyr1Z7pcB4ePn/vhJydjr4rxZBPhRnBnXtNE5
	 GbJg544UvYZsw==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id A484140B2D; Fri, 10 Jul 2026 09:53:48 +0100 (BST)
X-Spam-Level: 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673627; bh=f8X3hs3KfpHJ+ddgwbbAYYOPiPTGEV5jrh6ErK4IAGE=;
	h=From:To:Cc:Subject:Date:From;
	b=hCpNk2TSM0HiQFkm4gyyDSS9huvtyWz7gh2kh0oNe9PlhDxqA/TO55VIpfQHooY6L
	 UjOGAYounpETgQH1Z5VY+VLQKYndKsAV4jrUvEXGl3NtXQse0/n/po0usUbyjWtg7w
	 HXy424rldO3tWDzj0V3CDZme3JUjYUysYUMVphxrzS/+Oaa46XzdAyOD/jUsHuSo1h
	 9ryCRYrfJrx0hDJAkzN6zGmLZYi+xk7Mpvv5EP9DOLPypRRYcsDhkiacZJFqwWaW8V
	 NgdIolsr4sbCbJ9QPYq5NhZzlBUdvOzR7VAb2g5D2kvc1/yCDyTFBmRZZ5kpx+0eSx
	 Z8Ufh9vSrLXIw==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id 9DFDA40194;
	Fri, 10 Jul 2026 09:53:47 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org
Cc: Sean Young <sean@mess.org>
Subject: [PATCH 0/7] Fix leaks in rc core 
Date: Fri, 10 Jul 2026 09:53:28 +0100
Message-ID: <cover.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
Precedence: bulk
X-Mailing-List: linux-media@vger.kernel.org
List-Id: <linux-media.vger.kernel.org>
List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit


Sean Young (7):
  media: streamzap: Add missing rc_unregister_device()
  media: redrat3: Ensure rc device is freed if enable_detector() fails
  media: redrat3: Ensure we don't read beyond the end of the packet
  media: sunxi-cir: Ensure no more interrupts can occur before free
  media: meson-ir-tx: Ensure clock is disabled on unbind
  media: meson-ir-tx: Ensure rc_free_device() is called on unbind
  media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled

 drivers/media/rc/ir-hix5hd2.c  |  5 +++--
 drivers/media/rc/meson-ir-tx.c | 10 ++++------
 drivers/media/rc/redrat3.c     | 15 ++++++++++++++-
 drivers/media/rc/streamzap.c   |  1 +
 drivers/media/rc/sunxi-cir.c   |  2 +-
 5 files changed, 23 insertions(+), 10 deletions(-)

-- 
2.55.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from extorris.mess.org (extorris.mess.org [92.243.27.206])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DAA0397E85;
	Fri, 10 Jul 2026 08:53:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1783673638; cv=none; b=ai2VYVHTRiBZf/pBohMtYJ1B/deLIb8Gwd+3L2CA5SqCAfjwJX0h1Gc1tDfSOro43lbn992tab5o/dpm8O+38DOOxQQYqUwHiJKfZoMTYGnFaHBPwT6CtmdIWT2wctDx/MTLDNH0HfNjdCnl/a8NrMiu23yVrnDOUstx0+iyVAE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1783673638; c=relaxed/simple;
	bh=+TpKe/mgJklkLKnDljH7vM67ggh0YzGDXp06CXV8Mjw=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=BBzqWHPaSJ9aNSzFQhjq9Dw6pbaIGyP8b0beB4kz1/B8zoK1dUVGi31Hwf3tTOiyiI+HCh+JWCvvsEAcziJPJ7Q3BM1YdDKA9CxwcTDtqt7C+2jg0a1T7ohXY8GA1eT2JqSg+Os/IM5cVniuCc1ObIygOvXbUTljoNH1cgV9/wo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=g1gXM920; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=E2o7NHWi; arc=none smtp.client-ip=92.243.27.206
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="g1gXM920";
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="E2o7NHWi"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673629; bh=+TpKe/mgJklkLKnDljH7vM67ggh0YzGDXp06CXV8Mjw=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=g1gXM920p+Z60wPFjxfbByNjcAl0cWeXNo+eym/fae8o7nPg3PqNf4U22vDs9kcmX
	 4iH++0/sscOqYRt7I6qZvscH4trx2lh/dk5pfJxLUuWSIvFn10L3nFy/ZOac8YA+FI
	 cjiDE95mOW08flRTOdd7AbFnYH5AoBvoQDWr7e3sKvxXHRyO8HpXgyiYPljGmrFnXY
	 3dQ2SbQMr6nvb/X7C9Oc0cj5wi93pueMrhsm5S+ddfDOQHug1Mdk5m+JuWSYCw8i8i
	 JGujd55xcJKPVsx/KnTUMzbBzjmyPy6TDEdhV0r15697ZI9eFytighdpyM3vpoTcjU
	 +41eTelYS13xQ==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id 24DBA40B2E; Fri, 10 Jul 2026 09:53:49 +0100 (BST)
X-Spam-Level: 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673628; bh=+TpKe/mgJklkLKnDljH7vM67ggh0YzGDXp06CXV8Mjw=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=E2o7NHWiXW+yMtsmOo/R6CSiyYMpYiNSFZiCQ63C7tExL0mapqpa/oWZO/mDDQPmm
	 /uQcnwiadwxftLrIJ/6uubS5ajhOIUE26zIGGv/PinKZ5fpw4ofxnUoRSZX18ENMbB
	 oGvZPd5hvCkTBjDRDzT67wf6RcmrncoD50csB/oQy1bJCkv912bpdBZz70B7k31NpK
	 shnDMrpM2l540oGX7iMA2IaklApxqLxcElBVx6QHoH+QEVBnGxLJn91lFXP1+lNAxW
	 ILgHvHTmwOe2v7jOvmOrnralcodO7S91rGmhLxx8uwJ87Dz/Pbd1U9ATjkPpqGL3Hx
	 2zJAeNHBy4AIA==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id 2483740AF1;
	Fri, 10 Jul 2026 09:53:48 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	Oliver Neukum <oneukum@suse.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/7] media: streamzap: Add missing rc_unregister_device()
Date: Fri, 10 Jul 2026 09:53:29 +0100
Message-ID: <58e043bf525c8ea0410619d738b5104eed15d286.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
Precedence: bulk
X-Mailing-List: linux-media@vger.kernel.org
List-Id: <linux-media.vger.kernel.org>
List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

If usb_submit_urb() fails during probe, then the error path is missing a
call to rc_unregister_device(), which will leak various things like the
input device.

Fixes: 42844992664f ("media: rc: streamzap: Error handling in probe")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/streamzap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c
index 307985d74fe8..41195ad82734 100644
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -365,6 +365,7 @@ static int streamzap_probe(struct usb_interface *intf,
 
 	return 0;
 rc_submit_fail:
+	rc_unregister_device(sz->rdev);
 	rc_free_device(sz->rdev);
 	usb_set_intfdata(intf, NULL);
 rc_dev_fail:
-- 
2.55.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from extorris.mess.org (extorris.mess.org [92.243.27.206])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E69333BFE5B;
	Fri, 10 Jul 2026 08:53:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1783673638; cv=none; b=WrvZc/OACi154u6OZFtTyZQmx76wYuuGS1HQYZXG8wmQPtsaVt+d263K6IFTD3WW4dzy0Cp5ZYLl1kMQkVvLz8rPp6qSVtirmBXlzbyP/cXGKsb2RIEpS3DkaAbKRYZhtT0mfMzgpm6ZfafTtirTSzBYGZy4Okh7ce82TlJ+AGc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1783673638; c=relaxed/simple;
	bh=BG7YQu/+l+4a6tlt3FlGEMVNcMvn8qWv1zpRJHhhI2s=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=KBoz4uG93d1wTantEF+KMiKUW5coJStmL7t8P64NeWdKUVRS1pAeI1Mb/kTQd8vPiJqw0kPBkkKudG21Q0ac1tMDmw2uZEOpS/QX1EuEflUbyxFNm5+8Cb0QNVmY/C9MCoSOmmGTHIWRfa8dwJiTmSS1m3HICzOi8PTOr8NXyZg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=oISRSD4w; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=oISRSD4w; arc=none smtp.client-ip=92.243.27.206
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="oISRSD4w";
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="oISRSD4w"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673629; bh=BG7YQu/+l+4a6tlt3FlGEMVNcMvn8qWv1zpRJHhhI2s=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=oISRSD4wzezfDJ8GQYxRQKwvvokIl+acyoTltz/j+1eGYjThIJPk+rVxpmCs+YXfS
	 W7xfDMYqyafLtPL6hLSA0JTJm5cXL1mCVcxYU6KMesdMME8Ws75sjlyPWhofsKKyyi
	 cn7zp3Z0yR1y2VFXx6PaJuM7osaCGxSUoYEPnUMLOyNfYfgGjY7otA8JsedffsEdpn
	 3IJHOc9EMPv1KQIp0gXeZp3s6jUceKEPtYH2NzZz1cIy5RvgJlVh2g+V1t+U8I83I6
	 RvcLoqcfTHaYkli8qvQ2gEF49xk+A09mulka6ap0ITHN5jjont5moXBcmFhJE6CdiP
	 D4bOJwA/iIUHQ==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id BF8A540B4E; Fri, 10 Jul 2026 09:53:49 +0100 (BST)
X-Spam-Level: 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673629; bh=BG7YQu/+l+4a6tlt3FlGEMVNcMvn8qWv1zpRJHhhI2s=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=oISRSD4wzezfDJ8GQYxRQKwvvokIl+acyoTltz/j+1eGYjThIJPk+rVxpmCs+YXfS
	 W7xfDMYqyafLtPL6hLSA0JTJm5cXL1mCVcxYU6KMesdMME8Ws75sjlyPWhofsKKyyi
	 cn7zp3Z0yR1y2VFXx6PaJuM7osaCGxSUoYEPnUMLOyNfYfgGjY7otA8JsedffsEdpn
	 3IJHOc9EMPv1KQIp0gXeZp3s6jUceKEPtYH2NzZz1cIy5RvgJlVh2g+V1t+U8I83I6
	 RvcLoqcfTHaYkli8qvQ2gEF49xk+A09mulka6ap0ITHN5jjont5moXBcmFhJE6CdiP
	 D4bOJwA/iIUHQ==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id 3654240AF1;
	Fri, 10 Jul 2026 09:53:49 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Jarod Wilson <jarod@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 3/7] media: redrat3: Ensure we don't read beyond the end of the packet
Date: Fri, 10 Jul 2026 09:53:31 +0100
Message-ID: <415546fcdb57253472f021f4094e9ef3228333a8.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
Precedence: bulk
X-Mailing-List: linux-media@vger.kernel.org
List-Id: <linux-media.vger.kernel.org>
List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The length and offset is provided by the usb device, so it should be
validated.

Fixes: 2154be651b90 ("[media] redrat3: new rc-core IR transceiver device driver")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/redrat3.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index d2a805dbd3f3..424f8b9e4d17 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -358,8 +358,18 @@ static void redrat3_process_ir_data(struct redrat3_dev *rr3)
 
 	/* process each rr3 encoded byte into an int */
 	sig_size = be16_to_cpu(rr3->irdata.sig_size);
+
+	if (sig_size > RR3_MAX_SIG_SIZE) {
+		dev_err(dev, "length %u is incorrect\n", sig_size);
+		return;
+	}
+
 	for (i = 0; i < sig_size; i++) {
 		offset = rr3->irdata.sigdata[i];
+		if (offset >= RR3_DRIVER_MAXLENS) {
+			dev_err(dev, "offset %u is incorrect\n", offset);
+			return;
+		}
 		val = get_unaligned_be16(&rr3->irdata.lens[offset]);
 
 		/* we should always get pulse/space/pulse/space samples */
-- 
2.55.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from extorris.mess.org (extorris.mess.org [92.243.27.206])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DB663D8133;
	Fri, 10 Jul 2026 08:53:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1783673639; cv=none; b=fQKjbvdP8UdO/mskyWAb++Cc4rM9UeeQ/AnjUF3moW9eIZoiKAcZGGAMMr3XxYy6k0FwrmWZI0w12BgmiqNqy/MXx5oZmLLI7hXNb4tDiKLmwDgybT++V7ZeIKqUiYiv4VnnxpDYG2rBCW7zgFlZjQeFzoJtXfgBxkEehCpb/J8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1783673639; c=relaxed/simple;
	bh=KYzIeosnO2enhhXSMl91ubGLG8DH/itg66yDVgpWQPk=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=OpHLfanZxkXRP5CHIWe1Xh2Zf9XmZ9vqy8zsz968tdfnUJyhza81SUG53eU4/welFR6t9PbptvZSDr1mef9MOfd3mJ+glFih5jVswljWNqos6S8QHtbP4EN1SZx/JRx5w4Hd6LhBjUrABZS99B6Eu9F/yY6x42yY6iX23SUzD6Q=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=fJo18Q5p; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=KXHBa3IB; arc=none smtp.client-ip=92.243.27.206
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="fJo18Q5p";
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="KXHBa3IB"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673629; bh=KYzIeosnO2enhhXSMl91ubGLG8DH/itg66yDVgpWQPk=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=fJo18Q5pJMwU871MrM74VlcPVHF0yG0yhQKHySQm20sZ4xAPMKYrgJT/m1oO+r/Fm
	 Vf345itnNBtOoAtuE2sENdGKf7s5BHApYNT+AFc8nJjGcN7uDrklrS0XShJ78zR0np
	 QVPMdgzoKxZcAX6ZgT/RBOyv+WXjZQIyoqDpxCHGYDcjarEB2V+bHrB9OcQfdCdklQ
	 Z+04Pj79nJAv4ehGRKoPQNn0gG2t+uzmK42lypCJsTU1nVnqzgDS+Z1YswUldSxJrl
	 8VGyo4ax9woQ4oFxTIZkkv6FavHjqXx72V9vefOHXhjzHXPlq6X1Df1kD9CQg41HzS
	 zIfLggR2hic8w==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id 7D30C40B31; Fri, 10 Jul 2026 09:53:49 +0100 (BST)
X-Spam-Level: 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673628; bh=KYzIeosnO2enhhXSMl91ubGLG8DH/itg66yDVgpWQPk=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=KXHBa3IBBOAodgz3DSLRswbIXpWBSrghL4uDzhtcmDkJLv2LgFvKITW30zSRPWOo5
	 MMJCfgLFypCZN7aq3CD8wgCqNqz4ayCBKdLgYDY/n0dUxxQU0aDz3RilMf0pkXIBWf
	 t2FJhmBy23z0JGsw+HmxO958az6Wf62XmmqY+uUAf7FSzrhKDLa34AvjPeCjwTNZq5
	 JWeRacTmDmnq2dimIibBffAcz4dC5cBvY+avNC76ZB4KCodMvGeQzZ81ppU+9CtpTJ
	 jchFNiqJGam6P/7Tm6DQFsvllEYnl3U2LpF54jxDkqgbz3gaViF0iW3A9KKuHnDOJd
	 FGNNp3Zsv75Qw==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id AD91F40194;
	Fri, 10 Jul 2026 09:53:48 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Jarod Wilson <jarod@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/7] media: redrat3: Ensure rc device is freed if enable_detector() fails
Date: Fri, 10 Jul 2026 09:53:30 +0100
Message-ID: <000d0451503cea5d93dda388bf3a80f97c9e2a03.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
Precedence: bulk
X-Mailing-List: linux-media@vger.kernel.org
List-Id: <linux-media.vger.kernel.org>
List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

This particular error path does not free the rc device at all, with
its priv pointer still pointing at freed memory.

Fixes: 2154be651b90 ("[media] redrat3: new rc-core IR transceiver device driver")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/redrat3.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index 3f828a564e19..d2a805dbd3f3 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -1111,13 +1111,16 @@ static int redrat3_dev_probe(struct usb_interface *intf,
 	/* might be all we need to do? */
 	retval = redrat3_enable_detector(rr3);
 	if (retval < 0)
-		goto led_free;
+		goto rc_free;
 
 	/* we can register the device now, as it is ready */
 	usb_set_intfdata(intf, rr3);
 
 	return 0;
 
+rc_free:
+	rc_unregister_device(rr3->rc);
+	rc_free_device(rr3->rc);
 led_free:
 	led_classdev_unregister(&rr3->led);
 redrat_free:
-- 
2.55.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from extorris.mess.org (extorris.mess.org [92.243.27.206])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FB443DB996;
	Fri, 10 Jul 2026 08:53:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.243.27.206
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1783673641; cv=none; b=iIBw+m3HUH/3k6uSek5bFqBguZxN4hA9+TYURkRx+4Svob9tZJrqgqRa1dsBgEyWy05L2GiaRBVREs8cT2g+m/3d7afSTUQyDLVcAVqu8UOejMKFEtOXuI7/xOz8Xbilnx2s4n8ZiZMTf4MrctnfN9TSCDJZikE1AjNaqgB4QWs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1783673641; c=relaxed/simple;
	bh=vIGWW0q7qDZpE2XaivemThfhoGPHq88Yr7BOi4F1Frg=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=QI76fOcMXkEC7WWRvTTpw8tJKKzaEgcfZtCkqQj13ypcSrpbOq/FTProl1p7lexCntoayUbb7s5BUrf/SUFF56H9JeCFgo5y+iIgeXRkaqhXL7WXMbE0Q6+AsRWDGaDH+gIE+69IB7VHIXzDIuhTeDk/a2uEanYu+arAakZa6ls=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org; spf=pass smtp.mailfrom=mess.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=DKgRKquz; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b=LtnHROeA; arc=none smtp.client-ip=92.243.27.206
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="DKgRKquz";
	dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="LtnHROeA"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673633; bh=vIGWW0q7qDZpE2XaivemThfhoGPHq88Yr7BOi4F1Frg=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=DKgRKquzn6u4GXvR3/4y/vMTUockSPa2h+DGHTaeQLkTeROgA08ygLth5qiaHBzTn
	 SGjidYDFmxY1GDXbGvzyArcGg9f/C0ukLz1LqtVmfl7ISklIWndmzIkV+BW8I/MmbM
	 DfJJ1x09BZ7Pj9sa4oCojjyVZB2JKWAhWCtM0yUXWPCYlRBGHLPavYRSVYzD3TmDP6
	 akihak+3B211H2h4/A5M5q/0H3/CINMFzmWhWM/pYvt78Ic+wkWSG67yFSr1szptm3
	 zyjUxINeRdHiu8tBCIqLmSElfFuUmmEEB7lOHNVUva3Zdv+tiGlljVZaqgSwKxeFzX
	 AIMIxsTJU9zUg==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id E1A5B40B49; Fri, 10 Jul 2026 09:53:53 +0100 (BST)
X-Spam-Level: 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673631; bh=vIGWW0q7qDZpE2XaivemThfhoGPHq88Yr7BOi4F1Frg=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=LtnHROeAAHlaigMezuutfO9f/l1ULsb3aJaFpPhAQPgENEoAIUOe+6n7FqS2l+ILH
	 8x5HVlkA5CMGf9Duq1HWQd+WMg7H940vYfptn/oPQsuExaP/ZtzqgJ65K0/8fHq7b+
	 iojICn0qJ75RSwTDYK+DsjH7XzwzZyxPvzDUffCDYKQUI7E3tt5MrAcXkQyhZuJANM
	 yhoeeWaAa7boVU1eup6mzSGRqT+gsmP/LwlY1QjQXTO5nu557ha867/5ExeqeQjea4
	 w2RikHrKYgbltR+6MSKrpScJghhsblE0gmXOMdQV16nR8jiQoQOT4Q0z0K67aTw3S4
	 O9QcJ/4yhigaA==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id C022840B4C;
	Fri, 10 Jul 2026 09:53:51 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Zhangfei Gao <zhangfei.gao@linaro.org>,
	Guoxiong Yan <yanguoxiong@huawei.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 7/7] media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled
Date: Fri, 10 Jul 2026 09:53:35 +0100
Message-ID: <81c6f7a6243bbe73fbac2d9bd763b0e40b400125.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
Precedence: bulk
X-Mailing-List: linux-media@vger.kernel.org
List-Id: <linux-media.vger.kernel.org>
List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Once the interrupt handler is enabled, priv->rdev can be used. Ensure
it is setup correctly so there is no race condition.

Fixes: a84fcdaa9058 ("[media] rc: Introduce hix5hd2 IR transmitter driver")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/ir-hix5hd2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
index 1b061e4a3dcf..aa3de4d57a58 100644
--- a/drivers/media/rc/ir-hix5hd2.c
+++ b/drivers/media/rc/ir-hix5hd2.c
@@ -316,6 +316,9 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto clkerr;
 
+	priv->rdev = rdev;
+	priv->dev = dev;
+
 	if (devm_request_irq(dev, priv->irq, hix5hd2_ir_rx_interrupt,
 			     0, pdev->name, priv) < 0) {
 		dev_err(dev, "IRQ %d register failed\n", priv->irq);
@@ -323,8 +326,6 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 		goto regerr;
 	}
 
-	priv->rdev = rdev;
-	priv->dev = dev;
 	platform_set_drvdata(pdev, priv);
 
 	return ret;
-- 
2.55.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org>
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 60264C44508
	for <linux-amlogic@archiver.kernel.org>; Fri, 10 Jul 2026 08:54:03 +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:List-Subscribe:List-Help:List-Post:
	List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:
	Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
	List-Owner; bh=TRR638CQesalRhW7kbJnjLOsp4bkuPmJQffc/+XtNKg=; b=EgTWJs/M0CsrlB
	VvlE0ucPTk7bICoTA1llVOPVqTiHSTt/wcJTpF/6QgjovNPPE0V9Pp/Lkz60WlRQqe2WQQIHOhkAW
	VmRWiAAO45ZhPC7m0N6HoI/dGnX3KmDJCKzfmVEc/3wLd+3J3gHXg4Y4Ov7blmMxO6AWPGYNNbV67
	kID/VWyzMEGE4yAPEFCXEMRWinyA9XdbzySmdRvoV3BsVwhl78wUfOUVBVZ7uBuRmbj+Xf0ayizlZ
	cqgVATzFtdviQxWIzobuZ+RI5SF0plVnSFdgWKgxq/8tw90Nxxynrl08YBt3zX2GYXv6uxMwMAPdK
	iKAIP45Cclpm8+ZcBOlg==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zf-00000004Uzr-3tat;
	Fri, 10 Jul 2026 08:53:59 +0000
Received: from extorris.mess.org ([92.243.27.206])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zb-00000004Uxr-3Kr1;
	Fri, 10 Jul 2026 08:53:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673632; bh=VTN1gzPokpMjTvGP+n6o0ob+YikmETxLkSiXZ9C7eUw=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=phENkU7MPN1o4o4q+GhrR+sWTZHfaaG7rtEjrwtxXJEw6Xc0Z/jjmqfiCyfXszJH2
	 ZHj5yv7eDOPW5NQ33A97lBTgqM4HjVEikHMWkcNgSDCor1JtjiSZ7OnJ9bWuiTDztH
	 uhUphM1tVqWxqx8ObKAn+kt3xRo74inmuZdVfKgGKr7dY5OTvwXo5VvV8pGc00wTD4
	 s00t86c0/hiySKLvLRkaDDfwY/lgsEEePTZk/9GPeljeQYAUJKUjorOmjgloWng9IG
	 p2NSgdoVcr4b+Vvr41Ath8FkpZAUvtS7GIhG6zIPi4IqVIwW1clcuOFNlMfU7r8ZiB
	 aJFHMrqeJA96A==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id B6CD740B5F; Fri, 10 Jul 2026 09:53:52 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673631; bh=VTN1gzPokpMjTvGP+n6o0ob+YikmETxLkSiXZ9C7eUw=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=KoybHE3BX08uWg1kOaSiOcb06STgFgg/c6NzTKAEwAzutIhvnPJmOzJbreIlvCjXf
	 xkPO37jyL/qWXvvDMRB49DtoIJX/0gpRdhtCDqdbIb54ZM8kqmHZCc4cjJlsmifIed
	 tkaNav92YSa2RzIqKRXLqJ0f0jmfnRLCtZcC7Ip53sp3bu0KraEcAVD8dzbeOjgyYx
	 fXuugaSVdsLsM3+AZZy81Y56PsYmrBd3eFjml0XxYQzGWJU3QmI2+SipUtATiKH1ay
	 kYQJU68WN+h1Ms8Fd4y48xhMej/KpkiXyBGAz69i8T0UGpeD9fQkNSpHCUmUiBkvaT
	 R0oo78uOqZrIw==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id 1378B40AF1;
	Fri, 10 Jul 2026 09:53:51 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Hans Verkuil <hverkuil+cisco@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 6/7] media: meson-ir-tx: Ensure rc_free_device() is called on unbind
Date: Fri, 10 Jul 2026 09:53:34 +0100
Message-ID: <a11dc2d089d4e288b63412a0d3029393c577ee80.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
MIME-Version: 1.0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260710_015355_992083_45893234 
X-CRM114-Status: GOOD (  12.64  )
X-BeenThere: linux-amlogic@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-amlogic.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/>
List-Post: <mailto:linux-amlogic@lists.infradead.org>
List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org>
Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org

Make rc_dev devm managed.

Fixes: dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq callbacks")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/meson-ir-tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index e7bb107e6a84..abb107d19e8c 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -345,7 +345,7 @@ static int meson_irtx_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "irq request failed\n");
 
-	rc = rc_allocate_device(RC_DRIVER_IR_RAW_TX);
+	rc = devm_rc_allocate_device(dev, RC_DRIVER_IR_RAW_TX);
 	if (!rc)
 		return -ENOMEM;
 
@@ -358,10 +358,8 @@ static int meson_irtx_probe(struct platform_device *pdev)
 	rc->s_tx_duty_cycle = meson_irtx_set_duty_cycle;
 
 	ret = devm_rc_register_device(dev, rc);
-	if (ret < 0) {
-		rc_free_device(rc);
+	if (ret < 0)
 		return dev_err_probe(dev, ret, "rc_dev registration failed\n");
-	}
 
 	return 0;
 }
-- 
2.55.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org>
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 5CAAFC44501
	for <linux-amlogic@archiver.kernel.org>; Fri, 10 Jul 2026 08:54:03 +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:List-Subscribe:List-Help:List-Post:
	List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:
	Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
	List-Owner; bh=Q4s9UGyvu5VtZ6C8G+yoK8B2T0spb+K6z2vxG4fgjBM=; b=Q+aZOiIomL3f/K
	AVVewSsxTcadu2UTmYOnJ9mdiDuR2ay4yoi131YyHXkqHSSQndkLMVCIYAE5uRN4yVtG/ZjfK1/DZ
	/9bP4Uss7btICEqjLM/onQmCv0xsDrX7Sd4CG6xI+ImU8cqpoayAEkoSw03UqF4RtvhP1ECvbr+bq
	MntZCZnFeGtwjVUIQxNDNZVUitA+zqMoYhgYdLqkPDr2u6bXD8KbV4LFUN8+esT0Ivtzrb5BQXIbr
	TpMTrgI2fqN0UwOHwShU/mGASU8omVtDGDAh/QqaL6Fe3jCdOciFtgW7BBtHeIUtPDMkf6J74ukl8
	XaY/IeM2K6uGmlTgBZ7Q==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zd-00000004Uz1-3B9j;
	Fri, 10 Jul 2026 08:53:57 +0000
Received: from extorris.mess.org ([92.243.27.206])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi6zb-00000004Uxn-14NP;
	Fri, 10 Jul 2026 08:53:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673632; bh=uxrv4RU4kx2kz4TN49RM0DA9U2uRkeYrAsniJlkVWGM=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=TxIk0f6XWy5cxyaguSGDZjjYRC7Y+Sfnm6Qf0KRRImcbmbB8txi5fCzwnEMwrAjRM
	 gPRDFcKEiz7sZRk2v3j1iRNm0UguiBY2FyS2roSwQlQ8r8iZPkkVBPl7jvfjj1UFox
	 0oBJJeJMUvxlZQQpKFQJhvr0ilFjb2/3gj0hQvKc3A+xYjO3WLCg26ttfPmLT3ln1D
	 WD4BIscrD+UEps0Q5ivnWt3t/2oORyGYnLJ32azkTBO50jPdd89w297oJw/TI5l4P4
	 4Ct4XVpNQr4a7qDsY4PtNnQHbBWjRy1I1tXOXpa+jcPkgXZ7MisVGT2G/y98xQg21d
	 ds6LMXs3RfvjA==
Received: by extorris.mess.org (Postfix, from userid 1004)
	id 3EC8E40B5A; Fri, 10 Jul 2026 09:53:52 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020;
	t=1783673630; bh=uxrv4RU4kx2kz4TN49RM0DA9U2uRkeYrAsniJlkVWGM=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=tZUyiT1pLkcDLBaxdGo1d2qyxadn8fyYS7IVBEz3BbahdiWSN+QUYHRtenYNP89I2
	 KYgLloDRAKfgjEVslrcHUezE8WYuWY429IVf0CxTYxeYMzA0bWVKE1zsqdwkDmaff+
	 eh4CHSN+Aug9p83+dc0A7H0VGvPi8CKu6DlyJoUzoGi7Pui0NjiFRPi3a9zsLYrdTh
	 eagij+o0OBCwGW8ji6MO4I0hhib/bSJGy3zVXTai5PNQBDR+A2F+hMXURTPsQZs0OJ
	 ClNKahqCN0MwhlfmHBOfuWVAfWWa4i9fNWmWfVzqXM4eoFZfoN/UJKkFyXTEOSztak
	 3hali2luY2P2A==
Received: from maru.local (unknown [62.232.99.130])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by extorris.mess.org (Postfix) with ESMTPSA id 6E95140B29;
	Fri, 10 Jul 2026 09:53:50 +0100 (BST)
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] media: meson-ir-tx: Ensure clock is disabled on unbind
Date: Fri, 10 Jul 2026 09:53:33 +0100
Message-ID: <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
MIME-Version: 1.0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260710_015355_429911_77C45B7D 
X-CRM114-Status: GOOD (  13.15  )
X-BeenThere: linux-amlogic@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-amlogic.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/>
List-Post: <mailto:linux-amlogic@lists.infradead.org>
List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org>
Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org

clk_prepare_enabled() needs a call to clk_disable_prepare() on
driver unbind. Make it devm managed.

Fixes: 49be1c78d575 ("media: rc: introduce Meson IR TX driver")
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/meson-ir-tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index fded2c256f2a..e7bb107e6a84 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -288,8 +288,8 @@ static int meson_irtx_mod_clock_probe(struct meson_irtx *ir,
 	if (!np)
 		return -ENODEV;
 
-	clock = devm_clk_get(ir->dev, "xtal");
-	if (IS_ERR(clock) || clk_prepare_enable(clock))
+	clock = devm_clk_get_enabled(ir->dev, "xtal");
+	if (IS_ERR(clock))
 		return -ENODEV;
 
 	*clk_nr = IRB_MOD_XTAL3_CLK;
-- 
2.55.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DF383C5823
	for <linux-sunxi@lists.linux.dev>; Fri, 10 Jul 2026 09:03:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1783674202; cv=none; b=Kr93WX97H/ECRYVPBB+FZweexhIdSQKyykQPypOUssVcl83Em13TaJ+KMb1hU4cEblS8mTiG4QWwRbEC18xiyQHzV7glIJ7MSFUxe9aIXtAOMEyt+VHo1ku+Xrk3wydWC8ztAQK7PD5c6JkayAvTFyoGZg28nWh+0Ihj1aX4/OA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1783674202; c=relaxed/simple;
	bh=+NDha8slwu2mjQ+/5M4gz1q042LiXM2u77fFPHSbszM=;
	h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date:
	 Message-Id; b=pOk0h2cTsP9JlodmzpVyIsV9QkPq8s+DpkhUN5ppmHeQGvVy4q6soUC0qcS5cSOFNaZCy+yzj8Rn/PLAH3hJVSOHzeKcl/ENOhy+OyZ1SGM34ie4b2t89LeGOmBM640QmcEGRDPbxOWuZULUhEInThGARrXMhOm88GZAFXR0A9o=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PBYa5qOD; arc=none smtp.client-ip=100.103.45.18
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PBYa5qOD"
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B85C1F000E9;
	Fri, 10 Jul 2026 09:03:19 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1783674199;
	bh=tL8X/iE7ZQf1bvybRUg/7B3mKPU/c2No4kcG4X6gb3c=;
	h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date;
	b=PBYa5qOD+VLlrXqy5NDYyfeP18VKmTRB4P5d0S2nCpKnEyVd1betwaZHhz9g3mfcK
	 LKACI9TRo66HaQmDdCihsktQgs5+6w+UwJ5ZFKwlRRxpo7JGclwqndAdqYkkE5MFhE
	 OYFyK/iSvhiK/gQh30a+7JfOj/UTzQxSt+89ZEsMelEXQ30G7XwnlbCkkRBMwUn18J
	 mHayPjsrvqehNYtB4RwnW9HPm674Grp4ApWyaxqZU4iDyy652mMBL9QyF6ilrRNz6s
	 U+KwRQqJgDusoUu17HE41jXy+iGywZeBiSpI7RRkrVfIsWkhfdIn21P8Uv28xjim7m
	 HVc3DgS9GbJLA==
From: sashiko-bot@kernel.org
Subject: Re: [PATCH 4/7] media: sunxi-cir: Ensure no more interrupts can
 occur before free
Reply-To: sashiko-reviews@lists.linux.dev
To: "Sean Young" <sean@mess.org>
Cc: linux-sunxi@lists.linux.dev
In-Reply-To: <e74a0caf91aaefaf98476a191e6489c606632bf1.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
 <e74a0caf91aaefaf98476a191e6489c606632bf1.1783673420.git.sean@mess.org>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Date: Fri, 10 Jul 2026 09:03:19 +0000
Message-Id: <20260710090319.8B85C1F000E9@smtp.kernel.org>
Precedence: bulk
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>

Thank you for your contribution! Sashiko AI review found 2 potential issue(=
s) to consider:

Pre-existing issues:
- [High] The patch fails to fix the IRQ Use-After-Free race condition and e=
xacerbates a bus fault vulnerability by disabling hardware clocks without s=
ynchronizing the devm-managed interrupt.
- [High] The interrupt is requested before the hardware is initialized in t=
he probe function, leading to a possible bus fault on spurious interrupts a=
nd a Use-After-Free in the error path.
--

--- Patch [4]: [PATCH 4/7] media: sunxi-cir: Ensure no more interrupts can =
occur before free ---
commit 8ac4bdb72847c70ea6f26a6012ec7552bc70de07
Author: Sean Young <sean@mess.org>

media: sunxi-cir: Ensure no more interrupts can occur before free

This commit reorders the device removal sequence to call rc_free_device()
only after the hardware has been stopped via sunxi_ir_hw_exit(). The stated
intent is to prevent interrupts from occurring after the device is freed.

> diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
> index 28e840a7e5b8c..af1ee08ffdbec 100644
> --- a/drivers/media/rc/sunxi-cir.c
> +++ b/drivers/media/rc/sunxi-cir.c
> @@ -374,8 +374,8 @@ static void sunxi_ir_remove(struct platform_device *p=
dev)
>  	struct sunxi_ir *ir =3D platform_get_drvdata(pdev);
> =20
>  	rc_unregister_device(ir->rc);
> -	rc_free_device(ir->rc);
>  	sunxi_ir_hw_exit(&pdev->dev);
> +	rc_free_device(ir->rc);

[Severity: High]
This is a pre-existing issue, but does this sequence completely prevent
interrupts from occurring before the free?

Because the interrupt is managed by devm_request_irq(), it remains active
until devres cleanup runs after sunxi_ir_remove() completes. Since
sunxi_ir_hw_exit() only disables clocks, if a pending or spurious interrupt
fires afterward, sunxi_ir_irq() will access unclocked memory-mapped registe=
rs
and trigger a bus fault.

Additionally, if the interrupt handler runs concurrently on another process=
or:

sunxi_ir_irq()
    ir_raw_event_overflow(ir->rc);

could it access ir->rc after it is freed by rc_free_device() here, since
there is no synchronize_irq() or disable_irq() in sunxi_ir_remove()?

[Severity: High]
This is also a pre-existing issue, but does sunxi_ir_probe() suffer from a
similar race condition?

In sunxi_ir_probe(), devm_request_irq() is called to unmask the interrupt
before sunxi_ir_hw_init() enables the clock. If a pending interrupt from
a previous boot or a spurious interrupt fires during this window,
sunxi_ir_irq() will execute before the clock is enabled, potentially causing
a bus fault.

Also, if sunxi_ir_hw_init() fails, the error path eventually calls
rc_free_device() without explicitly disabling the active interrupt, which
leaves a window for a use-after-free on ir->rc.

>  }

--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/cover.1783673420.gi=
t.sean@mess.org?part=3D4

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org>
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 93914C43458
	for <linux-amlogic@archiver.kernel.org>; Fri, 10 Jul 2026 09:06:07 +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:MIME-Version:Reply-To:List-Subscribe:
	List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:
	References:In-Reply-To:Cc:To:Subject:From:Content-ID:Content-Description:
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
	List-Owner; bh=8KfdKFDja6LtQzSrh3G9MoLoyLXokd8tLd9TvmWhjVA=; b=2mGN5VWsL3ea9X
	kzyyG+qsSFgjJZx8byODafrKTZnD2zXxv5Y/8mw7z+IU+knIfEY3+HKfyHzctP9QxFnU8UCRQbiVd
	Hjt68xtFoHu4J0EselyhK0A0iStku9OsUBlfsBlW0aiKW4TGVPk8K04DzpDEgXkNc5CY5laY5tNv+
	vVjL9jROirlFS4ZQ0oXrSn13wSVLjcEPsuZ3nbeNSY3VYV+pQiCcFTHMAue7Dtg84i3HNz0Yxr/3m
	gncq0wERukPjXaUk0lff8p/uuqJhUuy+bAS7052Oj31YqZCGkxBOaWWHBMbHv1/F7gNTl88+ANpLJ
	rOeT4ah1ymrMREJ4K6kA==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi7BJ-00000004Wqf-2fHX;
	Fri, 10 Jul 2026 09:06:01 +0000
Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wi7BI-00000004WqW-0qZq
	for linux-amlogic@lists.infradead.org;
	Fri, 10 Jul 2026 09:06:00 +0000
Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	by tor.source.kernel.org (Postfix) with ESMTP id 4333360051;
	Fri, 10 Jul 2026 09:05:59 +0000 (UTC)
Received: by smtp.kernel.org (Postfix) with ESMTPSA id BACCD1F000E9;
	Fri, 10 Jul 2026 09:05:58 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1783674359;
	bh=J9rzyd6L340xp6rPy58GTHS1TRh27HvV2lr9MZUTMbM=;
	h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date;
	b=RrknD1ZZcgEIEnFXRExTtRpOg8Cirt7d5TYJFahF33p8wDZJwGc3iVmtVL2aFXM83
	 B7QJhVzIUJZT4R9CYNP7t/xLjErW4z3slphSyEJf4jGRmT29GUj5i22ULk7yvUt25b
	 PIVhaVlagVJn95b8jtaOQ11nvBMphiUKRlQFvJDTyUu31SA38uGnnYRzIhmvOU1ISV
	 Ow9P4MiqaDoV+OiQ4gJkvsekFax0UqD4oiFdOsIs++DfTg2Ax5W7wRdISEn2s+bLUe
	 jSShkMOp2rEvKAUkWxxPknarSndrxKuVuHAEOKwl6hpBIZTD3KmXCwa6VF/UqD8NJN
	 wcclcZRhLYZXA==
From: sashiko-bot@kernel.org
Subject: Re: [PATCH 5/7] media: meson-ir-tx: Ensure clock is disabled on
 unbind
To: "Sean Young" <sean@mess.org>
Cc: linux-amlogic@lists.infradead.org, neil.armstrong@linaro.org
In-Reply-To: <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
References: <cover.1783673420.git.sean@mess.org>
 <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
Date: Fri, 10 Jul 2026 09:05:58 +0000
Message-Id: <20260710090558.BACCD1F000E9@smtp.kernel.org>
X-BeenThere: linux-amlogic@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-amlogic.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/>
List-Post: <mailto:linux-amlogic@lists.infradead.org>
List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe>
Reply-To: sashiko-reviews@lists.linux.dev
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org>
Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org

VGhhbmsgeW91IGZvciB5b3VyIGNvbnRyaWJ1dGlvbiEgU2FzaGlrbyBBSSByZXZpZXcgZm91bmQg
MyBwb3RlbnRpYWwgaXNzdWUocykgdG8gY29uc2lkZXI6CgpOZXcgaXNzdWVzOgotIFtMb3ddIFRo
ZSBjb21taXQgbWVzc2FnZSByZWZlcnMgdG8gbm9uLWV4aXN0ZW50IGNsb2NrIEFQSSBmdW5jdGlv
bnMuCgpQcmUtZXhpc3RpbmcgaXNzdWVzOgotIFtIaWdoXSBUaGUgZHJpdmVyIG1hc2tzIGAtRVBS
T0JFX0RFRkVSYCBhbmQgb3RoZXIgZXJyb3IgY29kZXMgYnkgdW5jb25kaXRpb25hbGx5IHJldHVy
bmluZyBgLUVOT0RFVmAgd2hlbiBgZGV2bV9jbGtfZ2V0X2VuYWJsZWQoKWAgb3IgYHBsYXRmb3Jt
X2dldF9pcnEoKWAgZmFpbHMsIGJyZWFraW5nIHByb2JlIGRlZmVycmFsLgotIFtIaWdoXSBUaGUg
YHJjX2RldmAgc3RydWN0dXJlIGFsbG9jYXRlZCBkdXJpbmcgcHJvYmUgaXMgcGVybWFuZW50bHkg
bGVha2VkIG9uIGRyaXZlciB1bmJpbmQgZHVlIHRvIHRoZSB1c2Ugb2YgYHJjX2FsbG9jYXRlX2Rl
dmljZSgpYCB3aXRob3V0IGVuc3VyaW5nIGEgY29ycmVzcG9uZGluZyBgcmNfZnJlZV9kZXZpY2Uo
KWAgY2FsbC4KLS0KCi0tLSBQYXRjaCBbNV06IFtQQVRDSCA1LzddIG1lZGlhOiBtZXNvbi1pci10
eDogRW5zdXJlIGNsb2NrIGlzIGRpc2FibGVkIG9uIHVuYmluZCAtLS0KY29tbWl0IGU5NTg5NTA3
ODExMzQ5NWZlYTViOTgxZmFmZTAwMmM1ZmYxZjU2YzEKQXV0aG9yOiBTZWFuIFlvdW5nIDxzZWFu
QG1lc3Mub3JnPgoKbWVkaWE6IG1lc29uLWlyLXR4OiBFbnN1cmUgY2xvY2sgaXMgZGlzYWJsZWQg
b24gdW5iaW5kCgpUaGlzIHBhdGNoIGNoYW5nZXMgdGhlIGNsb2NrIGFjcXVpc2l0aW9uIGluIHRo
ZSBtZXNvbi1pci10eCBkcml2ZXIgdG8gdXNlCnRoZSBkZXZyZXMgbWFuYWdlZCBkZXZtX2Nsa19n
ZXRfZW5hYmxlZCgpLiBUaGlzIGVuc3VyZXMgdGhlIGNsb2NrIGlzCmF1dG9tYXRpY2FsbHkgZGlz
YWJsZWQgYW5kIHVucHJlcGFyZWQgd2hlbiB0aGUgZHJpdmVyIHVuYmluZHMuCgo+IGNsa19wcmVw
YXJlX2VuYWJsZWQoKSBuZWVkcyBhIGNhbGwgdG8gY2xrX2Rpc2FibGVfcHJlcGFyZSgpIG9uCj4g
ZHJpdmVyIHVuYmluZC4gTWFrZSBpdCBkZXZtIG1hbmFnZWQuCgpbU2V2ZXJpdHk6IExvd10KVGhp
cyBpc24ndCBhIGJ1ZywgYnV0IHRoZXJlIGFyZSB0eXBvcyBpbiB0aGUgZnVuY3Rpb24gbmFtZXMg
bWVudGlvbmVkIGhlcmUuClNob3VsZCB0aGV5IGJlIGNsa19wcmVwYXJlX2VuYWJsZSgpIGFuZCBj
bGtfZGlzYWJsZV91bnByZXBhcmUoKSBpbnN0ZWFkPwoKPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9t
ZWRpYS9yYy9tZXNvbi1pci10eC5jIGIvZHJpdmVycy9tZWRpYS9yYy9tZXNvbi1pci10eC5jCj4g
aW5kZXggZmRlZDJjMjU2ZjJhNi4uZTdiYjEwN2U2YTg0MyAxMDA2NDQKPiAtLS0gYS9kcml2ZXJz
L21lZGlhL3JjL21lc29uLWlyLXR4LmMKPiArKysgYi9kcml2ZXJzL21lZGlhL3JjL21lc29uLWly
LXR4LmMKPiBAQCAtMjg4LDggKzI4OCw4IEBAIHN0YXRpYyBpbnQgbWVzb25faXJ0eF9tb2RfY2xv
Y2tfcHJvYmUoc3RydWN0IG1lc29uX2lydHggKmlyLAo+ICAJaWYgKCFucCkKPiAgCQlyZXR1cm4g
LUVOT0RFVjsKPiAgCj4gLQljbG9jayA9IGRldm1fY2xrX2dldChpci0+ZGV2LCAieHRhbCIpOwo+
IC0JaWYgKElTX0VSUihjbG9jaykgfHwgY2xrX3ByZXBhcmVfZW5hYmxlKGNsb2NrKSkKPiArCWNs
b2NrID0gZGV2bV9jbGtfZ2V0X2VuYWJsZWQoaXItPmRldiwgInh0YWwiKTsKPiArCWlmIChJU19F
UlIoY2xvY2spKQo+ICAJCXJldHVybiAtRU5PREVWOwoKW1NldmVyaXR5OiBIaWdoXQpUaGlzIGlz
IGEgcHJlLWV4aXN0aW5nIGlzc3VlLCBidXQgZG9lcyB0aGlzIGluY29ycmVjdGx5IG1hc2sgLUVQ
Uk9CRV9ERUZFUj8KCklmIGRldm1fY2xrX2dldF9lbmFibGVkKCkgcmV0dXJucyAtRVBST0JFX0RF
RkVSLCByZXR1cm5pbmcgYSBoYXJkY29kZWQKLUVOT0RFViB3aWxsIHBlcm1hbmVudGx5IGZhaWwg
dGhlIHByb2JlIGluc3RlYWQgb2YgYWxsb3dpbmcgaXQgdG8gZGVmZXIuCldvdWxkIGl0IGJlIGJl
dHRlciB0byByZXR1cm4gUFRSX0VSUihjbG9jaykgaGVyZT8KClRoZSBzYW1lIGlzc3VlIGFwcGVh
cnMgdG8gaGFwcGVuIHdpdGggcGxhdGZvcm1fZ2V0X2lycSgpIGluCm1lc29uX2lydHhfcHJvYmUo
KToKCmRyaXZlcnMvbWVkaWEvcmMvbWVzb24taXItdHguYzptZXNvbl9pcnR4X3Byb2JlKCkgewog
ICAgLi4uCiAgICBpcnEgPSBwbGF0Zm9ybV9nZXRfaXJxKHBkZXYsIDApOwogICAgaWYgKGlycSA8
IDApCiAgICAgICAgcmV0dXJuIC1FTk9ERVY7CiAgICAuLi4KfQoKV291bGQgaXQgYmUgYmV0dGVy
IHRvIHByb3BhZ2F0ZSB0aGVzZSBlcnJvciBjb2RlcyBkaXJlY3RseT8KCgpbU2V2ZXJpdHk6IEhp
Z2hdClRoaXMgaXMgYW5vdGhlciBwcmUtZXhpc3RpbmcgaXNzdWUsIGJ1dCBkb2VzIHRoaXMgZHJp
dmVyIHBlcm1hbmVudGx5IGxlYWsKdGhlIHJjX2RldiBzdHJ1Y3R1cmUgb24gdW5iaW5kPwoKVGhl
IGRyaXZlciBhbGxvY2F0ZXMgdGhlIHN0cnVjdHVyZSBtYW51YWxseSBpbiBtZXNvbl9pcnR4X3By
b2JlKCk6Cgpkcml2ZXJzL21lZGlhL3JjL21lc29uLWlyLXR4LmM6bWVzb25faXJ0eF9wcm9iZSgp
IHsKICAgIC4uLgogICAgcmMgPSByY19hbGxvY2F0ZV9kZXZpY2UoUkNfRFJJVkVSX0lSX1JBV19U
WCk7CiAgICAuLi4KICAgIHJldCA9IGRldm1fcmNfcmVnaXN0ZXJfZGV2aWNlKGRldiwgcmMpOwog
ICAgLi4uCn0KClNpbmNlIGRldm1fcmNfcmVnaXN0ZXJfZGV2aWNlKCkgb25seSB0aWVzIHJjX3Vu
cmVnaXN0ZXJfZGV2aWNlKCkgdG8gdGhlCmRldnJlcyBjbGVhbnVwLCBhbmQgdGhlcmUgaXMgbm8g
bWF0Y2hpbmcgcmNfZnJlZV9kZXZpY2UoKSBjYWxsIG9yIHVzZSBvZgpkZXZtX3JjX2FsbG9jYXRl
X2RldmljZSgpLCBkb2VzIHRoZSBpbml0aWFsIHJlZmVyZW5jZSBjb3VudCByZW1haW4KdW4tZHJv
cHBlZCB3aGVuIHRoZSBkcml2ZXIgaXMgdW5ib3VuZD8KCi0tIApTYXNoaWtvIEFJIHJldmlldyDC
tyBodHRwczovL3Nhc2hpa28uZGV2LyMvcGF0Y2hzZXQvY292ZXIuMTc4MzY3MzQyMC5naXQuc2Vh
bkBtZXNzLm9yZz9wYXJ0PTUKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fCmxpbnV4LWFtbG9naWMgbWFpbGluZyBsaXN0CmxpbnV4LWFtbG9naWNAbGlzdHMu
aW5mcmFkZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZv
L2xpbnV4LWFtbG9naWMK

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org>
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 41F1FC44501
	for <linux-arm-kernel@archiver.kernel.org>; Sun, 12 Jul 2026 13:23:56 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help
	:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:
	Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:
	MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:
	Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
	bh=lBMLQxEd7BYJd8Kkqj4N1dnnSWNKtFYutuFtvv5S2hc=; b=332+xUVfIr0F6W5Dg8UkNGBqcf
	+PEGUeyqu8JoeKvup7qIdNES4KJ+ZLAPk/F8ox0VvLnbzPGcasaKxWIKz5f4xjzmBTuaYRNtqAQiM
	Ooh7SoAeYNMGnhGcdO5+pLSXcpVnT9jAtrROE+kITluO2EmcXPC3HbWOaBrC3IikY7ksk5l8AcCkv
	CeiLDVst9lFRRLj7GlJKZ/EqI5EKFZbcKi6R1osiPyn+ZW25rhsHwx4CmZaN7tWnN83mugpB5ZEHl
	ozLmfeV5fdExs0tsA1jSfx1rjFLmKw3iQ/7NEqRlvmri67h0zA3+8kMbbST0XIvSm7K+DSxj5r3Rp
	uYk4Q4oQ==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wiu9q-00000007TJy-3MkJ;
	Sun, 12 Jul 2026 13:23:46 +0000
Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wiu9n-00000007TJ6-18ra
	for linux-arm-kernel@lists.infradead.org;
	Sun, 12 Jul 2026 13:23:45 +0000
Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-2ce7d2adef4so30894895ad.3
        for <linux-arm-kernel@lists.infradead.org>; Sun, 12 Jul 2026 06:23:42 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1783862622; cv=none;
        d=google.com; s=arc-20260327;
        b=WTwE0woSNvScmgfW3jm0SJ4S+MSogCy6Tutfu3u8GAPTDNK4mIfCCpTR2aGtqsmAv2
         B+qVsdVYeffchHlbbGujWNoFK5kUBEkk5BzKZRvCseaHgu3BPqCWL8aSLkfpS4wnvnNf
         kz0P5kXdQ5OPqkHsU1huoAs+Buk8VxCQOBEvdyyiQO4z5LHSs9Naou2ludqJ4hupe/rA
         4pP8q1KZ3mBsd1uEjAsWO/wztBQYjszl24t6atjDEuQoQ0f+BMHUCoj/qSczewEJ21bp
         Rkud8qExrKQ6eVJbpfCyU618mBpcsLy/3YhF+PuSV1vTGmjj6DQSgb3Sx6f2WdAF9llY
         EBVA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=lBMLQxEd7BYJd8Kkqj4N1dnnSWNKtFYutuFtvv5S2hc=;
        fh=nV6GRgjB3tGLIC+5ABvRqBnVJ3yCQf+2/WOq1njcBws=;
        b=eob7OOFIvBn6SLM6HOOtZd8GCszYsDFe6r/hZDTnUwLJRVTPZZ/WUtv2jJORl8/y4d
         tWUDdxF3+PMW1TkX9QEzhptfRignf8YtUnwqgMa3j94+NuHvDKgRs33kscpjaJrAmn1N
         2gb8/plvqY0EuswfJOkDuaAn8Dw9oHhLnOQ4j9P1/h9aDD6S3hdRbFdhed22l4cS3QeF
         0ZVkJjeUQzV9h0RcYXHSXboosL0aObfyS2If+C9Vh46Fr+TfX9ddM5d4nJ9hQY1iHRx+
         U4g1w+HfV1YCdyMOBWnpNF4oednqMY442lR64IjtvFjRxbtvCfty1lbLL9dPNjxJ9JL0
         h7hw==;
        darn=lists.infradead.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20251104; t=1783862622; x=1784467422; darn=lists.infradead.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=lBMLQxEd7BYJd8Kkqj4N1dnnSWNKtFYutuFtvv5S2hc=;
        b=XkAQTJv5GIfTZKYcJMSH52ORy9zSFm964qfcc4m9Gkfq2zqE1JotAipjvV3nBpZVlN
         fw3YhV1ihuGrVDzVr1/LyBOK1fsRkBNS0LZrFOhrX/xDKto3V8JuSv1Qrc0FEItB/u3m
         TpLp5w2uqttzBalFKa29DF5VMTmuMBSgQrlQcoziuo3PSf2wJ9F1H87ELTIUtIhgeFTg
         /ryb5SSoZitT9D705OEvczysCJKqoi7/YRxsttObAWAF2fTHbbp/r/8A9msBW3Z3JEY8
         YERQHVWjikS/CWCNyFPMdudJdb7M2PwW+bLTGGzH+BxkJcHPjcMnfthn2Qt+AT9IGcds
         Kk1w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20251104; t=1783862622; x=1784467422;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=lBMLQxEd7BYJd8Kkqj4N1dnnSWNKtFYutuFtvv5S2hc=;
        b=I5L0lqNSG0jaRW3XYMAws+m/Y9FcSE1Jc3K/LmW1p47jWO5EPKqcMFKoXRBV2NpjiB
         AuX4OiLsuXQZ7uO3/hAh9nqpusbdudqB24lyyzIrL3d6WjiJG7FvqIxYkPCd8bExlB1U
         a3KekUDEj4wtzvfpVMUwCAM80yg1FZhRWLodCxXS7du6rU94AwEz1ICZx1N5DWNSpcGp
         nWOm0sk7qvO8RWSEYuXo/8S9WaTAr0AYLNigzAXfnC8kJHVHm8DIbg0OeBV9gMihE0iA
         bVop+OdEadFS1jnUbmb3KG9PokNFsEyIVQvgZMe6SLX6n/HNvTS15vX3hxJjI61iJLf2
         Z+zg==
X-Forwarded-Encrypted: i=1; AHgh+RrQR3EMbIPsMkKiGLnrj8His4uh27fic6x57wvIAtTq9hQb2ErkIWhAT8/pBbnB12AjRpxg22BQYv8aagB+tRoD@lists.infradead.org
X-Gm-Message-State: AOJu0YwSvfG1EgyW7nwOBTWsAVQz2vNo7G20X2g+fuKUAKrh7WdOB4Ie
	9W/9KGfbbzlfJKb+XUSQH9xC51B/eH1kamq6D7lSArnwB+bReUM2N+SA1w8BfQLc4g0xQNSQcGJ
	ewhQZSc3iB8wK5SEnmrZZPnqEAJm6bK0=
X-Gm-Gg: AfdE7clBl8HGG3WKk2emQEJlPV+Sg9y65uRAcTda4I2Apqpk+s07EtaogeY8+XQ0lCa
	Iuv9lkvh2JNn/spytb/ICHwn7FrPb53kF8O83IROrlTXhE32BOErE74hw+h8EbHDwWjS7mtghNm
	bnJDHqBB2KPlpjLj49acfcg3q5AXGlETKE+XPTd866VVNfKcpqGdd6HyYvivPEYoes7p3bLKuQW
	+Xia+aXCgYrTLseta+Jvyo5BYZqXDqoooWvGlgJhXUJLlD2v4yp0Bggy47rstOAVsIegMC33+0F
	ByA97ciKesTiMOpc94SvcUH4cdX+/g==
X-Received: by 2002:a17:903:240c:b0:2c8:1c05:16bb with SMTP id
 d9443c01a7336-2ce9ec0f108mr56548535ad.24.1783862621987; Sun, 12 Jul 2026
 06:23:41 -0700 (PDT)
MIME-Version: 1.0
References: <cover.1783673420.git.sean@mess.org> <a11dc2d089d4e288b63412a0d3029393c577ee80.1783673420.git.sean@mess.org>
In-Reply-To: <a11dc2d089d4e288b63412a0d3029393c577ee80.1783673420.git.sean@mess.org>
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Sun, 12 Jul 2026 15:23:30 +0200
X-Gm-Features: AUfX_mzypuSkZEBJ20fubf7QLH9Pq4J2Gq3FfCadOdbOn5XOHaqqRDGX3eTeNBA
Message-ID: <CAFBinCAMtch=GJO8mba9zCj9KT77AuDSpybcuH9_1gu1i=Hr2A@mail.gmail.com>
Subject: Re: [PATCH 6/7] media: meson-ir-tx: Ensure rc_free_device() is called
 on unbind
To: Sean Young <sean@mess.org>
Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>, 
	Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, 
	Jerome Brunet <jbrunet@baylibre.com>, Patrice Chotard <patrice.chotard@foss.st.com>, 
	Hans Verkuil <hverkuil+cisco@kernel.org>, linux-arm-kernel@lists.infradead.org, 
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260712_062343_313968_763C8899 
X-CRM114-Status: UNSURE (   8.14  )
X-CRM114-Notice: Please train this message.
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org

On Fri, Jul 10, 2026 at 10:53=E2=80=AFAM Sean Young <sean@mess.org> wrote:
>
> Make rc_dev devm managed.
>
> Fixes: dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq =
callbacks")
> Signed-off-by: Sean Young <sean@mess.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org>
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 1AC66C43458
	for <linux-amlogic@archiver.kernel.org>; Sun, 12 Jul 2026 13:23:53 +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:List-Subscribe:List-Help:List-Post:
	List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:
	In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description:
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
	List-Owner; bh=pQwBDBzoZ2lZsgLnuA8bw7IEl2A6miEsp88emZ//NF4=; b=bN6xfb4mBgU0aa
	eozU11zpIYP1yRbtjuvJ+LrCLNNa36tBVeCQlW+CsRGBVvSIAHFw5BOLMgVeeSR2RK5+wfuKUlxLK
	9w461rLIwjR9pPybNoGs15d0qJim3lq8uCIvLLXfinUkJjxB0EcGDAcQk144oZm9QqQQYP2U4WUy2
	gHYIjUKiSAKYpwq3haZk0BIqsBmKxEVLk2/md5rkSCQVnNiLKrd5VuHCs9k0N9X1q/Y6DHCPcOiGv
	bPcAXOTwzqlhGyBwl9n548uu/24X6Ia5gD3dC3VNIMe9a4faX+8AA9daQBRdZ9l+3We6yO2mF2lL4
	yiZFORFOhgk6peWXhpyw==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wiu9p-00000007TJr-38Wj;
	Sun, 12 Jul 2026 13:23:45 +0000
Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wiu9n-00000007TJ7-19ma
	for linux-amlogic@lists.infradead.org;
	Sun, 12 Jul 2026 13:23:44 +0000
Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-2c7c61b5292so40461635ad.0
        for <linux-amlogic@lists.infradead.org>; Sun, 12 Jul 2026 06:23:42 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1783862622; cv=none;
        d=google.com; s=arc-20260327;
        b=fNS0nFdhKJzBdp7Aez3KJndRiQtwwirmWC8Ai7hlt+/GKTI2S9Lcg2FEFnvz2XH7Wq
         0hAvcEx4jSJQyxk/cXZAhzpeWph92cbl7SxF12FMIxIgE9kVXntO7jDHXjZYVEPQHIiv
         Up0njdAbU4NL/YxILe8irWqFGsWtx6GKAG97lAAIbGkly66JrRFrtkqENpyipI3rCt+O
         C7ydyK8pdROMgAVGNq8A56wSQY0diAEYWBvxNC1jivc9nc2LDwydA2ALKahLRnmvBHrk
         T04Vpw600uKdu0zyPV71x7ouT28Nj+dfnuuoQ4r/cQ2K93Qt9rFD7xfApZkHGMa9ieHL
         bB/A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=lBMLQxEd7BYJd8Kkqj4N1dnnSWNKtFYutuFtvv5S2hc=;
        fh=TfittRnWqfUtDPXrRmNEcnvLCQ5/+7JWjJBg1QV+esE=;
        b=Kc4SIFcZed/DfYCWsZ0ddS/DeRtGOZ3TS66+aD1wNbB6DK2/pSRqGZR3Dld17XAZB1
         ACZCli4t2TGVRsSpBVpWNZeTRHXamaH6NpFNs9/HN4mNCgkocyBTy8wcGshsUTVHdI4F
         LOV3LnjdR/Q+9OwjAmKHvPsQDXfoaT9rxFcP487fwc2KD6DaUnJyTh0ImNmRGarjJo3h
         tj976C1XWxOUsne1ujyhD9AGBxsiXwRZPmCC/q8fQG7NPffxwjmUb4kEJLvy77Qe9tJ4
         htgvAoZ1vnHAbKi+pwXXMVFR6DpGNs8VE3gTDgOyecEy69sHx0TG1MX7dQJUdUZoHSrg
         ebWA==;
        darn=lists.infradead.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20251104; t=1783862622; x=1784467422; darn=lists.infradead.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=lBMLQxEd7BYJd8Kkqj4N1dnnSWNKtFYutuFtvv5S2hc=;
        b=XkAQTJv5GIfTZKYcJMSH52ORy9zSFm964qfcc4m9Gkfq2zqE1JotAipjvV3nBpZVlN
         fw3YhV1ihuGrVDzVr1/LyBOK1fsRkBNS0LZrFOhrX/xDKto3V8JuSv1Qrc0FEItB/u3m
         TpLp5w2uqttzBalFKa29DF5VMTmuMBSgQrlQcoziuo3PSf2wJ9F1H87ELTIUtIhgeFTg
         /ryb5SSoZitT9D705OEvczysCJKqoi7/YRxsttObAWAF2fTHbbp/r/8A9msBW3Z3JEY8
         YERQHVWjikS/CWCNyFPMdudJdb7M2PwW+bLTGGzH+BxkJcHPjcMnfthn2Qt+AT9IGcds
         Kk1w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20251104; t=1783862622; x=1784467422;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=lBMLQxEd7BYJd8Kkqj4N1dnnSWNKtFYutuFtvv5S2hc=;
        b=DDxo4SqVYswHhisTjVmwB39IFZ8MdFzvHaaVwrir9UE7GY+kKDcyglK0J35GQc0fnh
         DL+39zrNQnYI+NdW/OLzkwpKdoXlgXsPCCLUArcKXPVcbzO5ypujVnpZhjq2UruqueyI
         8b+NpoLjfpmic+NPtNf1elekgtKEbm7xLFClOGj95nlVKkTv+0Dd3AnFZAkHjAlGb0MW
         XnrE5iS4oezRkylM2dIzYyNJcZjDrXyQ3QnD379tVVlfMtRGfhTYuGLLgeqRZSe/am+J
         gIPJtUpbil8tG0MQjYhoAXtUSEvOYcO2i474efuv+C//aDMWiTrLC8J79F7resQQzz0g
         IqTw==
X-Forwarded-Encrypted: i=1; AHgh+RopW6H/Yi3+1TUv4HnBR7W85JQJ0rqSUJllx9SxfZ9DDO547Z0wt6gSHeziC9Y/z23JHIyfxJ5w1U0inymU@lists.infradead.org
X-Gm-Message-State: AOJu0Yxt20gk6xZfftSiCy/PdVD4TGeQW/QCr9n9rbXRLBRSVbo7cQ/n
	0+Qw/OHKV9is7CPO2KiY6xXu+0OFNpmrDtf2XhTY48MmSug/yNxhAmgRk8L3geuQJBPowJMe4du
	Iyd7unKJvdQ0ZOce1SZb6Qm9EFTsAsMk=
X-Gm-Gg: AfdE7cmHCRhtP/h0gkeorFvQG0GwDkuJZsqvcOrpbupsjtXK4HZLW0mKKsOX5ARRcBp
	V1kupD8ICgPXmibaGhDGO6bBwneek4T0LUH730Dq7tXZFvo3BRun5jZaFuGgDkuIVYjbgHCMcei
	VJqWdBP4ebjaVYC0LR9wXQaA8A+klAcI+B+7c3nX//C03nJSJhkaRvvvYj2MIYsjvUjz5k1dmaN
	DH1xI0w6dacC9w0jVCexS0CippE6uf+FR1nSEd7Es16Mib0zbHp0A2o0quSqIq+GUM5XkUb1xNG
	FcCz9AyXkTcfPGGly54NYm6RekXX+g==
X-Received: by 2002:a17:903:240c:b0:2c8:1c05:16bb with SMTP id
 d9443c01a7336-2ce9ec0f108mr56548535ad.24.1783862621987; Sun, 12 Jul 2026
 06:23:41 -0700 (PDT)
MIME-Version: 1.0
References: <cover.1783673420.git.sean@mess.org> <a11dc2d089d4e288b63412a0d3029393c577ee80.1783673420.git.sean@mess.org>
In-Reply-To: <a11dc2d089d4e288b63412a0d3029393c577ee80.1783673420.git.sean@mess.org>
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Sun, 12 Jul 2026 15:23:30 +0200
X-Gm-Features: AUfX_mzypuSkZEBJ20fubf7QLH9Pq4J2Gq3FfCadOdbOn5XOHaqqRDGX3eTeNBA
Message-ID: <CAFBinCAMtch=GJO8mba9zCj9KT77AuDSpybcuH9_1gu1i=Hr2A@mail.gmail.com>
Subject: Re: [PATCH 6/7] media: meson-ir-tx: Ensure rc_free_device() is called
 on unbind
To: Sean Young <sean@mess.org>
Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>, 
	Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, 
	Jerome Brunet <jbrunet@baylibre.com>, Patrice Chotard <patrice.chotard@foss.st.com>, 
	Hans Verkuil <hverkuil+cisco@kernel.org>, linux-arm-kernel@lists.infradead.org, 
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260712_062343_314455_962A2ADD 
X-CRM114-Status: UNSURE (   6.62  )
X-CRM114-Notice: Please train this message.
X-BeenThere: linux-amlogic@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-amlogic.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/>
List-Post: <mailto:linux-amlogic@lists.infradead.org>
List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org>
Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org

T24gRnJpLCBKdWwgMTAsIDIwMjYgYXQgMTA6NTPigK9BTSBTZWFuIFlvdW5nIDxzZWFuQG1lc3Mu
b3JnPiB3cm90ZToKPgo+IE1ha2UgcmNfZGV2IGRldm0gbWFuYWdlZC4KPgo+IEZpeGVzOiBkY2Nj
MGMzZGRmOGYgKCJtZWRpYTogcmM6IGZpeCByYWNlIGJldHdlZW4gdW5yZWdpc3RlciBhbmQgdXJi
L2lycSBjYWxsYmFja3MiKQo+IFNpZ25lZC1vZmYtYnk6IFNlYW4gWW91bmcgPHNlYW5AbWVzcy5v
cmc+ClJldmlld2VkLWJ5OiBNYXJ0aW4gQmx1bWVuc3RpbmdsIDxtYXJ0aW4uYmx1bWVuc3Rpbmds
QGdvb2dsZW1haWwuY29tPgoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX18KbGludXgtYW1sb2dpYyBtYWlsaW5nIGxpc3QKbGludXgtYW1sb2dpY0BsaXN0cy5p
bmZyYWRlYWQub3JnCmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8v
bGludXgtYW1sb2dpYwo=

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A07A31A6807
	for <linux-media@vger.kernel.org>; Sun, 12 Jul 2026 13:26:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.214.172
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1783862802; cv=pass; b=F+G7Fg7Osao6DegDMqZCOX20Jx0B6f6rqiaY1v1cF/oQmzVEB77njnl9+WfXX86SSDV4N6opP5EGEyvYK9Jp9eVqbq6UuR+fNAFVzFtFXdyEM7H26bRV0R9eLejSDr8WKGc2BD2JQY+4p3+Y4cPUc4Dik+jsLYH+QV1cEQT84ms=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1783862802; c=relaxed/simple;
	bh=atG8XqSPZX3CxozOHpc22+hLJIPB/QF7jvdDAJ3IDBc=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=g8Cn4S562zFDfQuDrAjlYJawY8sgPvmoeDCSzi/3jylkBeH0lvNdvI5D2OdygffiqMJreVJQp1AIuBPVQrJhf/vNjSq+PFUkYnO/6s9gp94fAldExm5y+fX1apermHyyMG+e7OdUhl4kzQ7/qOMjzo1I0lTXgqkvk+pJq/6zOF0=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b=IqYlPikd; arc=pass smtp.client-ip=209.85.214.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="IqYlPikd"
Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2ce7d2adef4so30910525ad.3
        for <linux-media@vger.kernel.org>; Sun, 12 Jul 2026 06:26:41 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1783862801; cv=none;
        d=google.com; s=arc-20260327;
        b=TjbCKPPqf2UhgDvDG/RCVOckFtoatFHSRXS+TYsN053bt9DDEEwMGZDOMcmQ84emdd
         z5s5SL/Jdg8jlS/AXDV+iNXqe4B/2eBBJhiDU7Fq+cFvb79czVO4Y+m0DJJRLSqKixsI
         56PzswCtvae68Z/yPeSg8SkaluBaNc4j61dwo9EhphohCmen8VdPEaBOvDmWQ9wi3kH8
         MvLaC93ekPQFufkyNraToNSo1WxVkBy8jPcKkLbbzg3zEw3fRBRcDTaO7r9yyIhMH4kS
         F/FHPOAuNRSPxCL8ZB8vnQfMVGWQRK2gCIiPOPgPf9+ez4HP63tnW1BA7JezKBrYiv0k
         trRQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=atG8XqSPZX3CxozOHpc22+hLJIPB/QF7jvdDAJ3IDBc=;
        fh=mBG6IdbLj7DVYnF9T1L+s5nLO3j0Cvuzg/Ar99kMLtI=;
        b=Vk4K4k8fDaI8gtJTS+hALuWDFsrcqotXiU6c5jz5vPWX4BuMi/wSFyV1Q4GpPN5tiN
         zpHiyo60W+O7N2AW2y7Cj7JQZ+Ez7bwzHgRnijb9Ck5BO8vOy6jEhacsvsD7kBTbyPx7
         AI6/por/nxSZlffxc+jTpLnDPgIOZiTRsbtOmdp+VGtWl82/zTs69ikAwTJ3qTeIIVWT
         XMhUaimXlOksG5GK3P22Vgeppm4LTP4+2HkInzIB07Vyz3cQhiPghf7qgOmOpH/JN3Po
         SvmuX1bb76PRuFWo4ZUgcpSprg/UgY1oqyKMPViwvtgVKzKH6IUGEK+xbT5um0hG24/D
         Ws6g==;
        darn=vger.kernel.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20251104; t=1783862801; x=1784467601; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=atG8XqSPZX3CxozOHpc22+hLJIPB/QF7jvdDAJ3IDBc=;
        b=IqYlPikdPznLiL/uc6HyNAEVr03WVnz5J0Pp+nDRxQewiGcnA3m7cINuAiAWmIS9Qf
         s1TuNlqNnSBeysFNxtEYEmSsUlGsTu0Ciq1X8knHptySPGgJ8gA7KcAImcFF7fkhlFUR
         Fd+A1Bxzj16hJjT0qRajt1MzbiteefDhcZyue3w8Zvo6aufI8TLvxNWoqzHSVQVodUzY
         FPl5Iv68ir249u77XDY2uuzmFNMIRKuhg7D9kDnGNX+OZ/PBnkWqGKZNIg8gREy4bh59
         kp0m4XuAum87HukMSxaTwM4gaFtp9uHnfGNaifpFCdQEfOV2bJ6T0C7UErRIwHB9Ix8e
         B10Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20251104; t=1783862801; x=1784467601;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=atG8XqSPZX3CxozOHpc22+hLJIPB/QF7jvdDAJ3IDBc=;
        b=XMKjN6nkrY9byNSdbmthihvFPS9X6tUmRPO4YPKWS+b2OFzu1DlmvX+X2bvSXwNmM0
         Qav+0xqHAkrrs3SO2J/HJ1lMIGAcXH9BrLrMJUQC8hXob2yPeGIPFPPbzABbrffyJFz4
         ms83YXQed5XABGE0F/musDp7pmStn1aEtRWf0eX8plLl4WftSl3CGNpZHLBrV6/bBTV+
         m3W24nZj49dLbZgEpSKT2LfhRoHqQIUm6aEMVhoQew7zIPeRIlzF4L+jfLkkN6FvSNSW
         0Mv/AKjenG/HH6kLc7xkHGPzhRu4Ub/QoflUsP7u0FAAmY7MJ8nKPPKdgkqNJqOZ2XjB
         EWHw==
X-Gm-Message-State: AOJu0Yx57a3H3pC3jg2l82kueBzZ5nJm676Vlsnd+B4LqXtF7atXPQva
	huYEzZtp1HZLIOJZm1johWPAm8h1/lXzGVtmKkyrLxvussWiIfUqUxKhCz6SHbpSy1KXocW0TBO
	XTuVdMVNjRSyY9pNy6S6PL5gFzYBzAlU=
X-Gm-Gg: AfdE7ck02dXhB6XD3dAlbjiQ7H3eVQfBOwmRVgCJHDwesaOJMqfDqZDB27sRAKhYpRP
	datlIWl3bdhRRi8td9MpvvnyuC9/ludX1v0OO1cwokAXyBXvZCaiV+nqw3xiztP1lkjHEIN9raB
	XWSCvS4+nQeeMhAimXwWy5hy1BAFnfr9+tj0ydeQPgHD5uXIgtOSGrQbrxYdhZ33y1x/A+tv6Wy
	H5qeZKoQ6kotG2eX8eE4SmTg3huCgB0ncxCdiPSlR+HtXKTvRSpvuOmeZgaCkTFbf1Y/sHc3GZL
	yR82gLBXZL1beFED9Nxyyy+v8n+f7A==
X-Received: by 2002:a17:903:2bcc:b0:2cc:77f3:a934 with SMTP id
 d9443c01a7336-2ce9f174650mr52007555ad.46.1783862800932; Sun, 12 Jul 2026
 06:26:40 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-media@vger.kernel.org
List-Id: <linux-media.vger.kernel.org>
List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <cover.1783673420.git.sean@mess.org> <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
In-Reply-To: <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Sun, 12 Jul 2026 15:26:30 +0200
X-Gm-Features: AUfX_myC7hx4fjS4-JwPMLgRui-DB58_FebfMXfpkFKB1CdDAdfGxwKF54CFOC4
Message-ID: <CAFBinCAPxkEfuY8orhd=R-6+2-uxWmEDJAaZmnKjJnzf_kQqUQ@mail.gmail.com>
Subject: Re: [PATCH 5/7] media: meson-ir-tx: Ensure clock is disabled on unbind
To: Sean Young <sean@mess.org>
Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>, 
	Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, 
	Jerome Brunet <jbrunet@baylibre.com>, Viktor Prutyanov <viktor.prutyanov@phystech.edu>, 
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, linux-arm-kernel@lists.infradead.org, 
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Jul 10, 2026 at 10:53=E2=80=AFAM Sean Young <sean@mess.org> wrote:
>
> clk_prepare_enabled() needs a call to clk_disable_prepare() on
> driver unbind. Make it devm managed.
>
> Fixes: 49be1c78d575 ("media: rc: introduce Meson IR TX driver")
> Signed-off-by: Sean Young <sean@mess.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

The additional error that sashiko reported will need to be fixed too.
Let's do that in a separate patch though to keep things simple.

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org>
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 4C1FDC43458
	for <linux-amlogic@archiver.kernel.org>; Sun, 12 Jul 2026 13:26:49 +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:List-Subscribe:List-Help:List-Post:
	List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:
	In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description:
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
	List-Owner; bh=r9vP1ORIHuTqWts7tQ8fXNM0Cb9bG70USdia4vasIl8=; b=cmkfQtA46XV3WY
	MSLgIqpNDh4EkbvUo2Nai0jvvj2KdaU7wk+S53aMY5rBI4sKMGFHjwJqQG8dlRwKCvDIbUA+FNGj8
	15KmbAgtVNb+mESniLf40R9jtSqLnm5prNKaN1hIkzLnQ13F0NEa4p793xXfWjTOxqB5fi0/dqDSE
	doixyuZPZTfSD6tP9pVJP+/4qCmPO2rAllSTJhc6DFLlJa9Yoe1cDcmCOKxb93Lo+Skt1bZajF6jo
	xpRs813UmG9XttHVPsT4tndBVTaPU5QyBVmzx80Rn7pJ7dFQK+JS24Vt3yjPidlyGblnKO4FT1N0A
	/DSVJhrhWRVuVIZgf6hQ==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
	by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wiuCj-00000007TZA-0zEs;
	Sun, 12 Jul 2026 13:26:45 +0000
Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f])
	by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
	id 1wiuCf-00000007TYR-3cBn
	for linux-amlogic@lists.infradead.org;
	Sun, 12 Jul 2026 13:26:43 +0000
Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2ce7d2adef4so30910495ad.3
        for <linux-amlogic@lists.infradead.org>; Sun, 12 Jul 2026 06:26:41 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1783862801; cv=none;
        d=google.com; s=arc-20260327;
        b=RMF3QpkIvrC4GclF1MvRrPgbjU/u8bvML4nw2RFnGQjsbjlHI+FXzGdATZgbeyPm1F
         0nUED2W73zIBLGeFZFXF0b673GqeLq0ZRinWaBCT86KKmLTjeOCBRhc5ruvQ2uWVIm8W
         PavcauEB0Ufd3nQI6CzM6STkm/0N+6uFLy27huM4ykakDUjqMJb7uhxpaoqwf6kwqW2A
         MNiLaFwn9yOG7Wzzm0UEeo8/y/+IfrX1heFfBGDadt/P4pTYS/xnsTY70/SXfl+MWRi0
         Vpa9DWf7yjbNJUynbsxh25phxMM6dq8I4+i2jxBgfIZK4E9J6Topip3w761HJob4CoCS
         q72g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=atG8XqSPZX3CxozOHpc22+hLJIPB/QF7jvdDAJ3IDBc=;
        fh=8fMAXSbCJue+5xG2Z1W0sqSdg8hu+0loWCMrTwpPvg0=;
        b=lHHSPOAgG+c+SbV3rLZ4+XxRHIau9PSM8rcwItTWsxaHVXQSP1eKSq1T3wOF8h2Pt2
         tQBWNytfLah48jymZdcsUjAg2zuMwys3AQJw6t4sJdYJL3BpN7yf6qOJvx2XcyT9bkbP
         M+qnBC9XN/f6UBbeWJdALCRmaXu4eJxStl5emIRthP+IIyyeruKFKz4uqXtgVohSnrCm
         fW/oskTshD44JBWjE7UGrCQDzqC3lgeOw2ZS2Q9CaDLpSd92V4ODLdOPZ5m1bai1pr4x
         QS1RLibye1mQGcVv8Twg9Q+hyI4A7Js0gwbiJDqwCSk7ISL+NmDcRvTFP9Z4yGj8XCR4
         Qudw==;
        darn=lists.infradead.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20251104; t=1783862801; x=1784467601; darn=lists.infradead.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=atG8XqSPZX3CxozOHpc22+hLJIPB/QF7jvdDAJ3IDBc=;
        b=qSuZWTapbD99J5AzH5suumIYlED20UEjHwimJMxcv1pcL+yuKMqCG6s5Dh+Q5xeetG
         K6ZSFz6TpOv/oRBA946I+rD9b6tPiDYc7oRVtAXq/e3fq7/a0Bz+7h9II3OSLcD/yMkF
         SsZ604wo4FTEUxg6sql1D++vQ5kWGNnIv/XFAg+YbUpZgjtHtRQGHvFTlZ0MVvPAXexp
         mEdhELW5faDED/LGV+uWZZ/FcOTAxELF/746mP4+y/hBnKoDF5Cz4qvw86Txuf9wmuiC
         DxzgVNpWeVcc5auLoCTwq4iCPOZWu+0hHPLKMiwmuj4jZMLof803sFyeISayW+w+N1rd
         UYoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20251104; t=1783862801; x=1784467601;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=atG8XqSPZX3CxozOHpc22+hLJIPB/QF7jvdDAJ3IDBc=;
        b=kM27/hZSPg3RkxkSxqglkldvATwRE9ioaMTw7fTcqmaHSCVbpuLsI9lvk+814aAZ6d
         JpO/nisYh0hufo+WtrVkwDDpCbZdxQAX1cDtzqzKXKtDfkDlkAx6T7rAYi3smmgxKeGz
         txbGrysYUc2qg2faEr7dinh+5lNaKj87goFnYYwdMsw+TRfbx/DYNeDZHsUtsqYxufEq
         CZ+238AdYACWIXEI/41K2kHYg6A09H9lWpJw61MPCY+HPHrNn+PpUNkM2DBnbjOSd8Lh
         VIj9nRkRyHJDpZoO4wuBpFXgnD7YQrq9sqiP8gyzYCpLOlSELD0qYMDo/SWCro8a8Kfb
         e1BQ==
X-Forwarded-Encrypted: i=1; AHgh+RrCi/yGW5L2bItFhfSLhEofmHt7oi1RjatO5gFiwx5UUx72u/ZtUYV8J5r1fdsrO3pCYUeZIqz6yUAcCRPM@lists.infradead.org
X-Gm-Message-State: AOJu0Yyi+POVRuIpuXAFOXfNvjnX0rturD8+CeJ0ngZzerwTLQqcfFs9
	x9hD8rHZatEIKnClapRYrCqI08RUZJGzsrEQBFlW6kX+3bfRVamr0gYZGyZxRYu5bW6riUpsQXl
	dfJ0ZafsXFJjPztJg+3rxKinaejfSsxg=
X-Gm-Gg: AfdE7ckbVu9kWgZQOYYzt5HM7bd/wdACuTRU+RzEF/w0ZH5OVi14iUptLmkW5XQg5IP
	Llgyp+0zXT7sJgpeZjTiouNkG9wfHLViE9i7y/Abd4hvd0LLCk9zaXZSD4MdvcLKhEe9uSoF2An
	GnX2MTosNFT2c0PEk3dghFRKWGbL2ejLHwjO/bmnR1kvj67u6pzcDuQiUGO6prxryT/PSq9Fa/g
	jwykodfzE7VqQKwWoE9vqGnTrvPxmeK/kK3lbh6tGZxql3oNGvF5wLi6wqN/AAEU7euicDigjCH
	6tBE06X9vm3j+nfQtPYdrQreIEnfOA==
X-Received: by 2002:a17:903:2bcc:b0:2cc:77f3:a934 with SMTP id
 d9443c01a7336-2ce9f174650mr52007555ad.46.1783862800932; Sun, 12 Jul 2026
 06:26:40 -0700 (PDT)
MIME-Version: 1.0
References: <cover.1783673420.git.sean@mess.org> <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
In-Reply-To: <2d7772d678d1815276c2d409d68ae4f4673d09aa.1783673420.git.sean@mess.org>
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Sun, 12 Jul 2026 15:26:30 +0200
X-Gm-Features: AUfX_myC7hx4fjS4-JwPMLgRui-DB58_FebfMXfpkFKB1CdDAdfGxwKF54CFOC4
Message-ID: <CAFBinCAPxkEfuY8orhd=R-6+2-uxWmEDJAaZmnKjJnzf_kQqUQ@mail.gmail.com>
Subject: Re: [PATCH 5/7] media: meson-ir-tx: Ensure clock is disabled on unbind
To: Sean Young <sean@mess.org>
Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>, 
	Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, 
	Jerome Brunet <jbrunet@baylibre.com>, Viktor Prutyanov <viktor.prutyanov@phystech.edu>, 
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, linux-arm-kernel@lists.infradead.org, 
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20260712_062641_903252_02345E77 
X-CRM114-Status: UNSURE (   8.49  )
X-CRM114-Notice: Please train this message.
X-BeenThere: linux-amlogic@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <linux-amlogic.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/>
List-Post: <mailto:linux-amlogic@lists.infradead.org>
List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>,
 <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org>
Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org

T24gRnJpLCBKdWwgMTAsIDIwMjYgYXQgMTA6NTPigK9BTSBTZWFuIFlvdW5nIDxzZWFuQG1lc3Mu
b3JnPiB3cm90ZToKPgo+IGNsa19wcmVwYXJlX2VuYWJsZWQoKSBuZWVkcyBhIGNhbGwgdG8gY2xr
X2Rpc2FibGVfcHJlcGFyZSgpIG9uCj4gZHJpdmVyIHVuYmluZC4gTWFrZSBpdCBkZXZtIG1hbmFn
ZWQuCj4KPiBGaXhlczogNDliZTFjNzhkNTc1ICgibWVkaWE6IHJjOiBpbnRyb2R1Y2UgTWVzb24g
SVIgVFggZHJpdmVyIikKPiBTaWduZWQtb2ZmLWJ5OiBTZWFuIFlvdW5nIDxzZWFuQG1lc3Mub3Jn
PgpSZXZpZXdlZC1ieTogTWFydGluIEJsdW1lbnN0aW5nbCA8bWFydGluLmJsdW1lbnN0aW5nbEBn
b29nbGVtYWlsLmNvbT4KClRoZSBhZGRpdGlvbmFsIGVycm9yIHRoYXQgc2FzaGlrbyByZXBvcnRl
ZCB3aWxsIG5lZWQgdG8gYmUgZml4ZWQgdG9vLgpMZXQncyBkbyB0aGF0IGluIGEgc2VwYXJhdGUg
cGF0Y2ggdGhvdWdoIHRvIGtlZXAgdGhpbmdzIHNpbXBsZS4KCl9fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fCmxpbnV4LWFtbG9naWMgbWFpbGluZyBsaXN0Cmxp
bnV4LWFtbG9naWNAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9y
Zy9tYWlsbWFuL2xpc3RpbmZvL2xpbnV4LWFtbG9naWMK

