]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix invalid pointer reference when prof_sel parameter is invalid
authorHuy Nguyen <huyn@mellanox.com>
Thu, 3 Nov 2016 23:48:47 +0000 (01:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Nov 2016 18:59:37 +0000 (14:59 -0400)
commita1b40ccaf945ebacf2023c1ed55834a768836c54
tree5f07278b04cbbbe05dec0da422a187d21e17fb2e
parent1a563539c7905c785ec69acd353539b9224c9039
net/mlx5: Fix invalid pointer reference when prof_sel parameter is invalid

When prof_sel is invalid, mlx5_core_warn is called but the
mlx5_core_dev is not initialized yet. Solution is moving the prof_sel code
after dev->pdev assignment

Fixes: dbd066654ffc ('net/mlx5: Improve driver log messages')
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/main.c