]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nvmem: sunplus-ocotp: release otp->clk before return
authorYi Yingao <m202271736@hust.edu.cn>
Tue, 9 May 2023 08:52:36 +0000 (16:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Jun 2023 11:42:16 +0000 (13:42 +0200)
commit095bb8ba45f28ed15296eb5b7662e03e57d5e34e
tree29a134c74c8c8b1c98b0d3473ca7e3a8c792c5c8
parentb1c8ea3c09db24a55ff84ac047cb2e9d9f644bf9
nvmem: sunplus-ocotp: release otp->clk before return

Smatch reports:
drivers/nvmem/sunplus-ocotp.c:205 sp_ocotp_probe()
warn: 'otp->clk' from clk_prepare() not released on lines: 196.

In the function sp_ocotp_probe(struct platform_device *pdev), otp->clk may
not be released before return.

To fix this issue, using function clk_unprepare() to release otp->clk.

Fixes: 8747ec2e9762 ("nvmem: Add driver for OCOTP in Sunplus SP7021")
Signed-off-by: Yi Yingao <m202271736@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Message-ID: <20230509085237.5917-1-m202271736@hust.edu.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/sunplus-ocotp.c