]> www.infradead.org Git - users/jedix/linux-maple.git/commit
serial: atmel: fix error path of probe function
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 23 Sep 2015 06:57:40 +0000 (08:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:27 +0000 (14:43 -0700)
commit8a1d5ab8258cfd3143eae034ee2a07e08ae2cf42
tree6110f9564a8b6f61656813a47cd8528ad9b109d5
parent5e2b2e1c44da4a44931466eb0a47b097840be43a
serial: atmel: fix error path of probe function

commit 8f1bd8f2ad2358d6a88c115481ff3e69817d1bde upstream.

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 722ccf416ac2 ("serial: atmel: fix error handling when
mctrl_gpio_init fails") on top of 3.19 which didn't have commit
6fbb9bdf0f3f ("tty/serial: at91: fix error handling in
atmel_serial_probe()") yet.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 722ccf416ac2 ("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>
drivers/tty/serial/atmel_serial.c