]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Check for allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 1 Feb 2019 08:32:26 +0000 (11:32 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2019 18:01:39 +0000 (10:01 -0800)
commitfcfa5345b198b93d5243bfd41284d503e08102a0
tree0c70b16e0ab6eda7ef4d847d80c98647d4b6ba0e
parenta5d8a49cf48ac4fbffe9e4e628623b065089df37
net: hns3: Check for allocation failure

We should return -ENOMEM if the kcalloc() fails.

Fixes: d6e3c3c633b0 ("net: hns3: add statistics for PFC frames and MAC control frame")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c