]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Fix uninitialized boolean variable pps
authorColin Ian King <colin.king@canonical.com>
Mon, 12 Jul 2021 14:37:50 +0000 (15:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Jul 2021 18:26:28 +0000 (11:26 -0700)
commitadd56e3dc762fcd414209fac559464aac790aa6e
treece2372cf64209e40989a12aab9d40944e5a078fa
parent985de00fbd552b3634036751e8709315b6ced7a9
octeontx2-pf: Fix uninitialized boolean variable pps

In the case where act->id is FLOW_ACTION_POLICE and also
act->police.rate_bytes_ps > 0 or act->police.rate_pkt_ps is not > 0
the boolean variable pps contains an uninitialized value when
function otx2_tc_act_set_police is called. Fix this by initializing
pps to false.

Addresses-Coverity: ("Uninitialized scalar variable)"
Fixes: 8c9d835588f1 ("octeontx2-pf: Add police action for TC flower")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c