diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2026-10-09 14:06:10 +0800 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-10-12 20:19:44 +0200 |
| commit | 1ce45f0e74d60e8279ed380c97047e6c351aee1b (patch) | |
| tree | eb29a894f1937cae6a208085210fe5e585244a9a /scripts/Makefile.thinlto | |
| parent | 8bef0196a4e21d4415091de2b6c498320e03ada2 (diff) | |
| download | linux-1ce45f0e74d60e8279ed380c97047e6c351aee1b.tar.gz linux-1ce45f0e74d60e8279ed380c97047e6c351aee1b.zip | |
mtd: rawnand: pl353: fix clk reference leak in pl35x_nfc_setup_interface()
pl35x_nfc_setup_interface() obtains a reference to the SMC "memclk" with
of_clk_get_by_name() and only uses it to read the clock rate. The
reference is never released: the function has many early return paths
and no clk_put() call anywhere, so the clock reference is leaked.
The hook is invoked repeatedly by the NAND core (nand_reset(),
nand_setup_interface() and the NAND_DATA_IFACE_CHECK_ONLY mode probing
loops), so the reference count keeps growing.
Release the clock reference with clk_put() as soon as its rate has been
read.
Fixes: 08d8c62164a3 ("mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
