Christophe Jaillet 8ce7aaaa97 net: dsa: loop: Check for memory allocation failure
If 'devm_kzalloc' fails, a NULL pointer will be dereferenced.
Return -ENOMEM instead, as done for some other memory allocation just a
few lines above.

Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-08 14:58:36 -04:00
..
2017-02-27 18:43:47 -08:00
2017-02-22 11:44:32 -08:00
2017-04-24 15:51:31 -04:00
2017-03-25 20:11:19 -07:00
2017-04-24 12:35:56 -04:00
2017-04-24 12:35:56 -04:00
2017-04-24 12:35:56 -04:00