octeontx2-af: Initialize maps.
authorRatheesh Kannoth <rkannoth@marvell.com>
Tue, 6 Feb 2024 02:40:00 +0000 (08:10 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 8 Feb 2024 11:03:02 +0000 (12:03 +0100)
commitdb010ff6700f24f96e91ed56ca29cb69335008ef
tree8b7da4e69a3ef697813e4d5987dae293f341347b
parent03fa49a386b298d357b90c9c5599f8d00dfc425c
octeontx2-af: Initialize maps.

kmalloc_array() without __GFP_ZERO flag does not initialize
memory to zero. This causes issues. Use kcalloc() for maps and
bitmap_zalloc() for bitmaps.

Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs")
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Reviewed-by: Brett Creeley <bcreeley@amd.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240206024000.1070260-1-rkannoth@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c