diff options
| author | Javier Carrasco <javier.carrasco.cruz@gmail.com> | 2024-10-19 22:27:03 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 14:02:54 +0100 |
| commit | b5dc237d19890390219c6bef70898277db5879fe (patch) | |
| tree | a966e5e7c45f3fcd2240f7b2da236cbada8ff2ce | |
| parent | 7baf94232651f39f7108c23bc9548bff89bdc77b (diff) | |
| download | linux-b5dc237d19890390219c6bef70898277db5879fe.tar.gz linux-b5dc237d19890390219c6bef70898277db5879fe.tar.bz2 linux-b5dc237d19890390219c6bef70898277db5879fe.zip | |
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>
| -rw-r--r-- | drivers/mtd/ubi/vmt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index 5a3558bbb903..e5cf3bdca3b0 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c @@ -143,8 +143,10 @@ static struct fwnode_handle *find_volume_fwnode(struct ubi_volume *vol) vol->vol_id != volid) continue; + fwnode_handle_put(fw_vols); return fw_vol; } + fwnode_handle_put(fw_vols); return NULL; } |
