Skip to content

Commit

Permalink
Revert "tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart"
Browse files Browse the repository at this point in the history
This reverts commit 580d952 ("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: 580d952 ("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>
  • Loading branch information
Florian Fainelli authored and Greg Kroah-Hartman committed May 4, 2020
1 parent 6a8b55e commit 092a9f5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/tty/serial/bcm63xx_uart.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 092a9f5

Please sign in to comment.