serial: stm32: improve platform_get_irq condition handling in init_port
authorErwan Le Ray <erwan.leray@foss.st.com>
Thu, 21 Jan 2021 14:23:09 +0000 (15:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jan 2021 18:21:49 +0000 (19:21 +0100)
commite0f2a902c9f02fcb36c22f63e0db67e73375c843
tree0c1abf5d732d96e8b2f40029de05ce8049b1490d
parente9103f47bf1a1bbf0ab0ea90eda3e208653a5f57
serial: stm32: improve platform_get_irq condition handling in init_port

Replace "ret" variable by "irq" variable from platform_get_irq condition
handling in stm32_init_port as suggested by Jiri in "STM32 uart cleanup and
improvement" series review.
This change will prevent port->irq to be unexpectly modified by a potential
change of "ret" value introduced by a new patch.

Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Link: https://lore.kernel.org/r/20210121142309.6327-1-erwan.leray@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c