mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
bnxt_en: allocate enough space for ->ntp_fltr_bmap
[ Upstream commitac45bd93a5] We have the number of longs, but we need to calculate the number of bytes required. Fixes:c0c050c58d("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8795ee7bed
commit
e37aab9c63
@@ -2867,7 +2867,8 @@ static int bnxt_alloc_ntp_fltrs(struct bnxt *bp)
|
||||
INIT_HLIST_HEAD(&bp->ntp_fltr_hash_tbl[i]);
|
||||
|
||||
bp->ntp_fltr_count = 0;
|
||||
bp->ntp_fltr_bmap = kzalloc(BITS_TO_LONGS(BNXT_NTP_FLTR_MAX_FLTR),
|
||||
bp->ntp_fltr_bmap = kcalloc(BITS_TO_LONGS(BNXT_NTP_FLTR_MAX_FLTR),
|
||||
sizeof(long),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!bp->ntp_fltr_bmap)
|
||||
|
||||
Reference in New Issue
Block a user