Re: [PATCH] net: dsa: loop: Check for memory allocation failure

From: Florian Fainelli
Date: Sun May 07 2017 - 19:22:52 EST


Le 05/05/17 Ã 22:29, Christophe JAILLET a Ãcrit :
> 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@xxxxxxxxxx>

Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
--
Florian