]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: potential error pointer dereference in error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 3 May 2019 12:28:39 +0000 (15:28 +0300)
committerLeon Romanovsky <leonro@mellanox.com>
Tue, 28 May 2019 14:35:06 +0000 (17:35 +0300)
commit27a0038124b73acfa6c3059a6e668312b130d8e0
tree590f158e23f7646dc447e01e7adbb8471eceb82e
parentb48e0d7fe5b5eb1732dfe0b8057a6c721c42f2d4
net/mlx5: potential error pointer dereference in error handling

The error handling was a bit flipped around.  If the mlx5_create_flow_group()
function failed then it would have resulted in dereferencing "fg" when
it was an error pointer.

Fixes: fc14e10bad57 ("net/mlx5: Eswitch, enable RoCE loopback traffic")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/rdma.c