]> git.baikalelectronics.ru Git - kernel.git/commit
sfc_ef100: potential dereference of null pointer
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 15 Dec 2021 14:37:31 +0000 (22:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Dec 2021 10:55:32 +0000 (10:55 +0000)
commit75c8b94013f491a77faa5348e36ca3d8d60bc1d4
treebd2b4f10b2eeb7d062427e9d8299e86bbe6db0b3
parent62598f4816dbc8e31716bb40772b902ed005acc7
sfc_ef100: potential dereference of null pointer

The return value of kmalloc() needs to be checked.
To avoid use in efx_nic_update_stats() in case of the failure of alloc.

Fixes: a55cfb214878 ("sfc_ef100: statistics gathering")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef100_nic.c