drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[]
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Fri, 22 Jan 2021 12:21:34 +0000 (14:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:25:57 +0000 (23:25 +0100)
commitd30cb3d348b8c1ba4b663680d299d5ccc74ed905
treedc987e09eb57e3354877383ee3dd7135c489c9eb
parent082dc611fdc8515f526930153f6430ce1db3d97e
drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[]

commit 680896556805d3ad3fa47f6002b87b3041a45ac2 upstream.

of_match_node() calls __of_match_node() which loops though the entries of
matches array. It stops when condition:
(matches->name[0] || matches->type[0] || matches->compatible[0]) is
false. Thus, add a null entry at the end of at91_soc_allowed_list[]
array.

Fixes: caab13b49604 ("drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs")
Cc: stable@vger.kernel.org #4.12+
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/atmel/soc.c