From: Kevin Cernekee Date: Sun, 9 Nov 2014 08:55:47 +0000 (-0800) Subject: of: Fix crash if an earlycon driver is not found X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~87^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab74d00a39f70e1bc34a01322bb59f3750ca7a8c;p=pandora-kernel.git of: Fix crash if an earlycon driver is not found __earlycon_of_table_sentinel.compatible is a char[128], not a pointer, so it will never be NULL. Checking it against NULL causes the match loop to run past the end of the array, and eventually match a bogus entry, under the following conditions: - Kernel command line specifies "earlycon" with no parameters - DT has a stdout-path pointing to a UART node - The UART driver doesn't use OF_EARLYCON_DECLARE (or maybe the console driver is compiled out) Fix this by checking to see if match->compatible is a non-empty string. Signed-off-by: Kevin Cernekee Cc: # 3.16+ Signed-off-by: Rob Herring --- Reading git-diff-tree failed