]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: qcom_geni_serial: Use signed variable to get IRQ
authorKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
Sat, 7 Apr 2018 00:49:00 +0000 (18:49 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 08:22:30 +0000 (10:22 +0200)
commit5fadbc445c792c4b55b1aefd32c17a1dd6e72ce5
tree9af0cf1859485d85197b0bd2d7ea70bb909a4996
parent56d5b845f02a544a06026dca67e824cca8a23308
tty: serial: qcom_geni_serial: Use signed variable to get IRQ

The platform_get_irq can return error. Assigning the return value to an
unsigned variable and checking it for negative value will always return
false.

Use an intermediate signed variable to get IRQ information, check for any
error and then assign it to 'irq' variable inside uart_port structure.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/qcom_geni_serial.c