summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2018-12-10 17:50:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 09:20:24 +0100
commit02ef84c0b26723f4d963b595fb8417904ed7af6b (patch)
treee1447d11c8bbecda59722d0cda771010d510ae6f
parente1bb74ba4525adaaabd041a6e6dc9a05f53b2170 (diff)
downloadlinux-stable-02ef84c0b26723f4d963b595fb8417904ed7af6b.tar.gz
linux-stable-02ef84c0b26723f4d963b595fb8417904ed7af6b.tar.bz2
linux-stable-02ef84c0b26723f4d963b595fb8417904ed7af6b.zip
gpio: raspberrypi-exp: decrease refcount on firmware dt node
[ Upstream commit 85af74c474b21940e88483fd48f6094145c89d97 ] We're getting a reference RPi's firmware node in order to be able to communicate with it's driver. We should decrease the reference count on the dt node after being done with it. Fixes: a98d90e7d588 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service") Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpio/gpio-raspberrypi-exp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-raspberrypi-exp.c b/drivers/gpio/gpio-raspberrypi-exp.c
index d6d36d537e37..b77ea16ffa03 100644
--- a/drivers/gpio/gpio-raspberrypi-exp.c
+++ b/drivers/gpio/gpio-raspberrypi-exp.c
@@ -206,6 +206,7 @@ static int rpi_exp_gpio_probe(struct platform_device *pdev)
}
fw = rpi_firmware_get(fw_node);
+ of_node_put(fw_node);
if (!fw)
return -EPROBE_DEFER;