powerpc/pseries: Add missing of_node_put() in ibmebus

In ibmebus_match_path(), use of_node_put() to drop the reference
returned by of_find_node_by_path() before testing for equality of the
pointers.

Signed-off-by: Liang He <windhl@126.com>
[mpe: Rewrite change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220619074016.4068105-1-windhl@126.com
This commit is contained in:
Liang He 2022-06-19 15:40:16 +08:00 коммит произвёл Michael Ellerman
Родитель f4f8320b01
Коммит 1c754b49c0
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -152,7 +152,11 @@ static const struct dma_map_ops ibmebus_dma_ops = {
static int ibmebus_match_path(struct device *dev, const void *data)
{
struct device_node *dn = to_platform_device(dev)->dev.of_node;
return (of_find_node_by_path(data) == dn);
struct device_node *tn = of_find_node_by_path(data);
of_node_put(tn);
return (tn == dn);
}
static int ibmebus_match_node(struct device *dev, const void *data)