From: Woody Zhang <woodylab@foxmail.com>
To: Mark Brown <broonie@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
Woody Zhang <woodylab@foxmail.com>
Subject: [PATCH 1/2] spi: sun6i: Fix memory leak on device removal
Date: Mon, 2 Oct 2023 14:29:58 +0800 [thread overview]
Message-ID: <tencent_25938315DAA0CF57818CE1D5CFCCC4B02406@qq.com> (raw)
In-Reply-To: <20231002062957.1741396-1-woodylab@foxmail.com>
Call spi_master_put to free the spi_master structure on device removal
and driver detachment.
Signed-off-by: Woody Zhang <woodylab@foxmail.com>
---
drivers/spi/spi-sun6i.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index fddc63309773..33cec49d5538 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -774,6 +774,7 @@ static void sun6i_spi_remove(struct platform_device *pdev)
dma_release_channel(master->dma_tx);
if (master->dma_rx)
dma_release_channel(master->dma_rx);
+ spi_master_put(master);
}
static const struct sun6i_spi_cfg sun6i_a31_spi_cfg = {
--
2.39.2
next parent reply other threads:[~2023-10-02 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231002062957.1741396-1-woodylab@foxmail.com>
2023-10-02 6:29 ` Woody Zhang [this message]
[not found] ` <tencent_E465261B2BB2C1EBAF5C19912B9F19B7E107@qq.com>
2023-10-02 13:02 ` [PATCH 2/2] spi: sun4i: Fix memory leak on device removal Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_25938315DAA0CF57818CE1D5CFCCC4B02406@qq.com \
--to=woodylab@foxmail.com \
--cc=broonie@kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox