Commit 580d952e authored by Zou Wei's avatar Zou Wei Committed by Greg Kroah-Hartman

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

This patch fixes below error reported by coccicheck

drivers/tty/serial/bcm63xx_uart.c:848:2-8: ERROR: missing clk_put;
clk_get on line 842 and execution via conditional on line 846

Fixes: ab4382d2 ("tty: move drivers/serial/ to drivers/tty/serial/")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZou Wei <zou_wei@huawei.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1587472306-105155-1-git-send-email-zou_wei@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2717769e
...@@ -843,8 +843,10 @@ static int bcm_uart_probe(struct platform_device *pdev) ...@@ -843,8 +843,10 @@ static int bcm_uart_probe(struct platform_device *pdev)
if (IS_ERR(clk) && pdev->dev.of_node) if (IS_ERR(clk) && pdev->dev.of_node)
clk = of_clk_get(pdev->dev.of_node, 0); clk = of_clk_get(pdev->dev.of_node, 0);
if (IS_ERR(clk)) if (IS_ERR(clk)) {
clk_put(clk);
return -ENODEV; return -ENODEV;
}
port->iotype = UPIO_MEM; port->iotype = UPIO_MEM;
port->irq = res_irq->start; port->irq = res_irq->start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment