Re: [PATCH] net: caif: check return value of alloc_netdev

2015-11-09 Thread David Miller
From: Rasmus Villemoes Date: Mon, 9 Nov 2015 13:19:10 +0100 > I don't know if dev can actually be NULL here, but the test should be > above alloc_netdev(), to avoid leaking the struct net_device in case > dev is actually NULL. And of course the return value from alloc_netdev > should be tested.

[PATCH] net: caif: check return value of alloc_netdev

2015-11-09 Thread Rasmus Villemoes
I don't know if dev can actually be NULL here, but the test should be above alloc_netdev(), to avoid leaking the struct net_device in case dev is actually NULL. And of course the return value from alloc_netdev should be tested. Signed-off-by: Rasmus Villemoes --- Maybe the existing code was suppo