Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart"

This reverts commit 580d952e44de5509c69c8f9346180ecaa78ebeec ("tty:
serial: bcm63xx: fix missing clk_put() in bcm63xx_uart") because we
should not be doing a clk_put() if we were not successful in getting a
valid clock reference via clk_get() in the first place.

Fixes: 580d952e44de ("tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200501013904.1394-1-f.fainelli@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Florian Fainelli and committed by
Greg Kroah-Hartman
092a9f59 6a8b55ed

+1 -3
+1 -3
drivers/tty/serial/bcm63xx_uart.c
··· 843 843 if (IS_ERR(clk) && pdev->dev.of_node) 844 844 clk = of_clk_get(pdev->dev.of_node, 0); 845 845 846 - if (IS_ERR(clk)) { 847 - clk_put(clk); 846 + if (IS_ERR(clk)) 848 847 return -ENODEV; 849 - } 850 848 851 849 port->iotype = UPIO_MEM; 852 850 port->irq = res_irq->start;