]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
fpga: region: release of_parse_phandle nodes after use
authorIan Abbott <abbotti@mev.co.uk>
Wed, 15 Nov 2017 22:33:12 +0000 (16:33 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Feb 2018 03:08:37 +0000 (21:08 -0600)
commitb7d53af838f36a60b7198e8b55331992cd08cdb1
tree3af78101a9f8fb93fb79530e6d2d7f7ff5ff5c98
parent98f7f4bed05c8ab678669d0838b5f5a4db935220
fpga: region: release of_parse_phandle nodes after use

BugLink: http://bugs.launchpad.net/bugs/1748072
commit 0f5eb1545907edeea7672a9c1652c4231150ff22 upstream.

Both fpga_region_get_manager() and fpga_region_get_bridges() call
of_parse_phandle(), but nothing calls of_node_put() on the returned
struct device_node pointers.  Make sure to do that to stop their
reference counters getting out of whack.

Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/fpga/fpga-region.c