summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorWentao Liang <vulab@iscas.ac.cn>2026-09-17 10:29:24 +0000
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-09-25 15:33:43 +0200
commit94edcda45d888c3bb1310de11e10e4537c166f00 (patch)
treead405a46c15f7525c1531ca087cbd2d835df2a65 /include/uapi/linux
parent8a485a40f45a19c5fcafb5cbee7387c2762af7c4 (diff)
downloadlinux-next-94edcda45d888c3bb1310de11e10e4537c166f00.tar.gz
linux-next-94edcda45d888c3bb1310de11e10e4537c166f00.zip
mtd: rawnand: atmel: Fix MCK clock leak in atmel_nand_controller_init()
atmel_nand_controller_init() takes a reference to the MCK clock with of_clk_get() and keeps it in nc->mck for the lifetime of the controller. If the "atmel,smc" phandle is missing or the SMC regmap cannot be obtained afterwards, the error path jumps to out_release_dma which only releases the DMA channel, so the clock reference is leaked. The callers return the error directly and never run atmel_nand_controller_cleanup(), where the clock is normally put. Release the reference on those error paths. The path on which of_clk_get() itself fails keeps jumping to out_release_dma, as nc->mck only holds an error pointer there. Fixes: f9ce2eddf176 ("mtd: nand: atmel: Add ->setup_data_interface() hooks") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions