aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorinel Iordache <[email protected]>2020-08-03 10:07:34 +0300
committerDavid S. Miller <[email protected]>2020-08-03 16:20:15 -0700
commit3207f715c34317d08e798e11a10ce816feb53c0f (patch)
tree24eee1f3db5979a932d80ee79076248ace7b6c92
parentcc5d229a122106733a85c279d89d7703f21e4d4f (diff)
fsl/fman: fix eth hash table allocation
Fix memory allocation for ethernet address hash table. The code was wrongly allocating an array for eth hash table which is incorrect because this is the main structure for eth hash table (struct eth_hash_t) that contains inside a number of elements. Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel Iordache <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/ethernet/freescale/fman/fman_mac.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_mac.h b/drivers/net/ethernet/freescale/fman/fman_mac.h
index dd6d0526f6c1..19f327efdaff 100644
--- a/drivers/net/ethernet/freescale/fman/fman_mac.h
+++ b/drivers/net/ethernet/freescale/fman/fman_mac.h
@@ -252,7 +252,7 @@ static inline struct eth_hash_t *alloc_hash_table(u16 size)
struct eth_hash_t *hash;
/* Allocate address hash table */
- hash = kmalloc_array(size, sizeof(struct eth_hash_t *), GFP_KERNEL);
+ hash = kmalloc(sizeof(*hash), GFP_KERNEL);
if (!hash)
return NULL;