Skip to content
This repository was archived by the owner on Oct 5, 2018. It is now read-only.

Commit 8f1bd8f

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
serial: atmel: fix error path of probe function
If atmel_init_gpios fails the port has already been marked as busy (in line 2629), so this must be undone in the error path. This bug was introduced because I created the patch that finally became 722ccf4 ("serial: atmel: fix error handling when mctrl_gpio_init fails") on top of 3.19 which didn't have commit 6fbb9bd ("tty/serial: at91: fix error handling in atmel_serial_probe()") yet. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Fixes: 722ccf4 ("serial: atmel: fix error handling when mctrl_gpio_init fails") Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c1a752b commit 8f1bd8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/atmel_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
27862786
ret = atmel_init_gpios(port, &pdev->dev);
27872787
if (ret < 0) {
27882788
dev_err(&pdev->dev, "Failed to initialize GPIOs.");
2789-
goto err;
2789+
goto err_clear_bit;
27902790
}
27912791

27922792
ret = atmel_init_port(port, pdev);

0 commit comments

Comments
 (0)