gpio: raspberrypi-exp: decrease refcount on firmware dt node
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Mon, 10 Dec 2018 16:50:05 +0000 (17:50 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 17 Dec 2018 14:28:30 +0000 (15:28 +0100)
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>
drivers/gpio/gpio-raspberrypi-exp.c

index d6d36d5..b77ea16 100644 (file)
@@ -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;