mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 00:08:50 +00:00
serial: ar933x_uart: disable clk on error handling path in probe
ar933x_uart_probe() does not invoke clk_disable_unprepare() on one error handling path. This patch fixes that. Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Link: https://lore.kernel.org/r/20201111124426.42638-1-zhengzengkai@huawei.com Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e67c139c48
commit
425af48352
@ -789,8 +789,10 @@ static int ar933x_uart_probe(struct platform_device *pdev)
|
|||||||
goto err_disable_clk;
|
goto err_disable_clk;
|
||||||
|
|
||||||
up->gpios = mctrl_gpio_init(port, 0);
|
up->gpios = mctrl_gpio_init(port, 0);
|
||||||
if (IS_ERR(up->gpios) && PTR_ERR(up->gpios) != -ENOSYS)
|
if (IS_ERR(up->gpios) && PTR_ERR(up->gpios) != -ENOSYS) {
|
||||||
return PTR_ERR(up->gpios);
|
ret = PTR_ERR(up->gpios);
|
||||||
|
goto err_disable_clk;
|
||||||
|
}
|
||||||
|
|
||||||
up->rts_gpiod = mctrl_gpio_to_gpiod(up->gpios, UART_GPIO_RTS);
|
up->rts_gpiod = mctrl_gpio_to_gpiod(up->gpios, UART_GPIO_RTS);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user