i40e: Check for memory allocation failure
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Fri, 5 May 2017 19:29:13 +0000 (21:29 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 31 May 2017 10:13:36 +0000 (03:13 -0700)
commit0a4ecc2c5e0479f269e6ca5f9588b23d649aa948
treed0349b76a1a65baef3883e4e03b85e389b25dd1b
parent0bc0706b46cd345537f9bd3cdf5d84c33f5484e4
i40e: Check for memory allocation failure

If 'kzalloc' fails, a NULL pointer will be dereferenced. Return -ENOMEM
instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_client.c