mlxsw: spectrum_dpipe: Add missing error path
authorIdo Schimmel <idosch@mellanox.com>
Fri, 7 Feb 2020 17:26:28 +0000 (19:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:37:03 +0000 (08:37 +0100)
commit332c8b5bc35868836ecbcabf60854c096cb270f0
treed1f10f64c880b2d0fb22f47b7aee2209eef6fca3
parent399ca7ee91300129eb0f5d0cba9c0aeba00908c3
mlxsw: spectrum_dpipe: Add missing error path

[ Upstream commit 3a99cbb6fa7bca1995586ec2dc21b0368aad4937 ]

In case devlink_dpipe_entry_ctx_prepare() failed, release RTNL that was
previously taken and free the memory allocated by
mlxsw_sp_erif_entry_prepare().

Fixes: 2ba5999f009d ("mlxsw: spectrum: Add Support for erif table entries access")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c