Skip to content

Commit

Permalink
serial: atmel: fix error path of probe function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: 722ccf4 ("serial: atmel: fix error handling when mctrl_gpio_init fails")
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Uwe Kleine-König authored and gregkh committed Oct 4, 2015
1 parent c1a752b commit 8f1bd8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
ret = atmel_init_gpios(port, &pdev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to initialize GPIOs.");
goto err;
goto err_clear_bit;
}

ret = atmel_init_port(port, pdev);
Expand Down

0 comments on commit 8f1bd8f

Please sign in to comment.