]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: minimal: Fix an error handling path in 'mlxsw_m_port_create()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 25 Jan 2020 21:18:47 +0000 (22:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jan 2020 10:13:53 +0000 (11:13 +0100)
commitfd5d897e69fd199016e90b4ac778946b1565eff5
treee30859d123cd9a680ac1587ca96df6fd24183476
parent92edce81186e4745ebdf2ecadaf7998c13a564c7
mlxsw: minimal: Fix an error handling path in 'mlxsw_m_port_create()'

An 'alloc_etherdev()' called is not ballanced by a corresponding
'free_netdev()' call in one error handling path.

Slighly reorder the error handling code to catch the missed case.

Fixes: 4c3b3ab2d533 ("mlxsw: minimal: Add ethtool support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/minimal.c