]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: serial: Correct logic in serial_find_console_or_panic()
authorSimon Glass <sjg@chromium.org>
Fri, 31 Jul 2015 15:31:20 +0000 (09:31 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:00:51 +0000 (08:00 +0200)
commit770ab6680c789906c0417e37fafa6b48681e971c
treecb6035c5e09d18dc0549397694037dea89dd639a
parent35d2960a79c9e92ee269d7eec9c43924e6b7f5a5
dm: serial: Correct logic in serial_find_console_or_panic()

In a final attempt to find a console UART this function uses the first
first available serial device. However the check for a valid device is
inverted.

This code is only executed when there is in fact no serial UART, but at
present it can fail to reach the panic_str() call in this case, and start
trying to use a non-existent UART.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/serial/serial-uclass.c