]> 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)
commite3a58069429f977507e85af6735f032fbe2ec17b
tree590f158e23f7646dc447e01e7adbb8471eceb82e
parent49250288820449e26abffc1305ba221bd05ce90d
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: f9ec3586a73a ("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