]> xenbits.xensource.com Git - arm/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2020 09:34:39 +0000 (09:34 +0000)
commit73226c74746d4906ba1d591f4bca8f6253de14d7
tree95fb9414ff4b1905e8ae23b205c1a3e9207e414a
parent3c8c966cc7182b3975ef955a1258ec9e30dc3057
mlxsw: minimal: Fix an error handling path in 'mlxsw_m_port_create()'

[ Upstream commit 6dd4b4f3936e17fedea1308bc70e9716f68bf232 ]

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: c100e47caa8e ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlxsw/minimal.c