]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: acl: Fix mlxsw_afa_block_commit error path
authorJiri Pirko <jiri@mellanox.com>
Wed, 8 Feb 2017 09:39:16 +0000 (10:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Feb 2017 20:13:44 +0000 (15:13 -0500)
commit22124e39d1d47c2d96b349980724fdc9b7038370
treee18f75a5d2824e01a3abc32f76b775bdff752992
parentfbc716f5ec94424f73e6cf876f8997c38671064e
mlxsw: acl: Fix mlxsw_afa_block_commit error path

No rollback is needed since the chain is in consistent state and
mlxsw_afa_block_destroy() will take care of putting it away. So remove
the one we have now which is wrong. Also move the set of 'finished' flag
to the beginning of the function, because the block is certainly unusable
for future action addition no matter if the function succeeds or not.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 493481d2d3d8 ("mlxsw: core: Introduce flexible actions support")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c