net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 8 Nov 2021 21:28:55 +0000 (22:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:12 +0000 (19:17 +0100)
commit6fb190ff57166148ba7db70ca3d544b07f207dc8
tree946a777093162a4b9296bd77951af734f19e65c2
parent0c8ee89e351c6095cf3210df252f625279e1fd70
net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory

[ Upstream commit 7a166854b4e24c57d56b3eba9fe1594985ee0a2c ]

It is spurious to allocate a bitmap without initializing it.
So, better safe than sorry, initialize it to 0 at least to have some known
values.

While at it, switch to the devm_bitmap_ API which is less verbose.

Fixes: 4b41d3436796 ("net: ethernet: ti: cpsw: allow untagged traffic on host port")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ti/cpsw_ale.c