base: soc: Check for NULL SoC device attributes

If soc_device_match() is used to check the value of a specific
attribute that is not present for the current SoC, the kernel crashes
with a NULL pointer dereference.

Fix this by explicitly checking for the absence of a needed property,
and considering this a non-match.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ab6a713e7dc2f92ad3bc3387122524655431501e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 file changed