]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode()
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Sat, 19 Oct 2024 20:27:03 +0000 (22:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:19 +0000 (13:54 +0100)
commitca4f3c525937e3c72bd4867965901954bb4b17e2
treeecbeecf61b9dbef6e042cd66bbb40dded1737bae
parentcdc87d2f39698f1ba7e3bd634779a6252418fede
mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode()

commit 07593293ffabba14125c8998525adde5a832bfa3 upstream.

The 'fw_vols' fwnode_handle initialized via
device_get_named_child_node() requires explicit calls to
fwnode_handle_put() when the variable is no longer required.

Add the missing calls to fwnode_handle_put() before the function
returns.

Cc: stable@vger.kernel.org
Fixes: 51932f9fc487 ("mtd: ubi: populate ubi volume fwnode")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/ubi/vmt.c