Skip to contentSkip to conversation

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

PATCH New Florian Fainelli 1 participant 1 message May 1, 2020 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/tty/serial/bcm63xx_uart.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/bcm63xx_uart.c +1 -3
index ed0aa5c0d9b7..5674da2b76f0 100644
@@ -843,10 +843,8 @@ static int bcm_uart_probe(struct platform_device *pdev)
 	if (IS_ERR(clk) && pdev->dev.of_node)
 		clk = of_clk_get(pdev->dev.of_node, 0);
 
-	if (IS_ERR(clk)) {
-		clk_put(clk);
+	if (IS_ERR(clk))
 		return -ENODEV;
-	}
 
 	port->iotype = UPIO_MEM;
 	port->irq = res_irq->start;
Signature · 1 line
2.17.1