of: platform: fix OF node refcount leak
authorSudeep Holla <Sudeep.Holla@arm.com>
Thu, 18 Jan 2018 10:43:39 +0000 (10:43 +0000)
committerArnd Bergmann <arnd@arndb.de>
Tue, 23 Jan 2018 09:15:11 +0000 (10:15 +0100)
commite2105ca8beb0c776a52ae8d18bc6b564745de2e4
treed00c06bed8be6ba9e112dca4f42395e1f5121a65
parent95140ed16db560ef86ab4ebe1a4e9b748d098669
of: platform: fix OF node refcount leak

We need to call of_node_put() for device nodes obtained with
of_find_node_by_path().

Fixes: 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()")
Reported-by: Loys Ollivier <lollivier@baylibre.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/of/platform.c