]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Fix uninitialized use of 'port_up' in mlx4_en_set_channels()
authorChristian Engelmayer <cengelma@gmx.at>
Sat, 17 May 2014 21:52:03 +0000 (23:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 May 2014 01:14:43 +0000 (21:14 -0400)
commitf9f600eedbe054d9cffdbec9c6878b689b51e5dc
tree5b981da204f04375137c885a58efa9518918267d
parente051ec7e8396f1b7c4fdaef8ba7034a14ee17e78
net/mlx4_en: Fix uninitialized use of 'port_up' in mlx4_en_set_channels()

Function mlx4_en_set_channels() stops running ports before performing the
requested action. In that case local variable 'port_up' is set so that the
port is restarted at the end of the function, however, in case the port was
not stopped, variable 'port_up' is left uninitialized and the behaviour is
undetermined. Detected by Coverity - CID 751497.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c