]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5_en: Add missing check for memory allocation failure
authorAmir Vadai <amirv@mellanox.com>
Thu, 4 Jun 2015 16:30:36 +0000 (19:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2015 23:41:00 +0000 (16:41 -0700)
commit8259842ab5e77be2715222151aa8ce33c22e76a3
tree5d36a97493ba9c73dd59aa9f9a947e8609ff605a
parent3b37ef03aab38631ddf5a8d67058261fa180f7f2
net/mlx5_en: Add missing check for memory allocation failure

The patch 713baaca43b4: "net/mlx5: Ethernet resource handling files"
from May 28, 2015, leads to the following static checker warning:

drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c:726 mlx5e_create_main_flow_table()
error: potential null dereference 'g'.  (kcalloc returns null)

Fixes: 713baaca43b4 ("net/mlx5: Ethernet resource handling files")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c