From 59eaeba63a171127a90bb76187536ba66076af40 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 12 Oct 2018 07:43:11 +0200 Subject: of: base: Change logic in of_alias_get_alias_list() Check compatible string first before setting up bit in bitmap to also cover cases that allocated bitfield is not big enough. Show warning about it but let driver to continue to work with allocated bitfield to keep at least some devices (included console which is commonly close to serial0) to work. Fixes: b1078c355d76 ("of: base: Introduce of_alias_get_alias_list() to check alias IDs") Fixes: ae1cca3fa347 ("serial: uartps: Change uart ID port allocation") Signed-off-by: Michal Simek Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/tty/serial') diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index c3f6cce300aa..57c66d2c3471 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1394,7 +1394,7 @@ static int cdns_get_id(struct platform_device *pdev) if (!alias_bitmap_initialized) { ret = of_alias_get_alias_list(cdns_uart_of_match, "serial", alias_bitmap, MAX_UART_INSTANCES); - if (ret) { + if (ret && ret != -EOVERFLOW) { mutex_unlock(&bitmap_lock); return ret; } -- cgit v1.2.3