]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Nov 2021 14:33:04 +0000 (14:33 +0000)
commit9c10872b401d7c8e8c3c2e2456e2c40308b76812
tree84f8b7ae69cb51a60e78c6c881d002f00d040065
parent438d87b29cdfd3bac3c6ebb9f52a55a64e583d5c
net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory

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: c2ed31849c9e ("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>
drivers/net/ethernet/ti/cpsw_ale.c