net/mlx5: Fix command bad flow on command entry allocation failure
authorMoshe Shemesh <moshe@mellanox.com>
Sun, 25 Jun 2017 15:45:32 +0000 (18:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:49:33 +0000 (08:49 -0700)
commitd19d0ac684e505200aad8db44271acbd0ab35bd1
treee4ef3c0d9d6edbf20a626afcd1074c0ef0695255
parentfca84d617f77ef8b5e52ef4db057971e96eee25a
net/mlx5: Fix command bad flow on command entry allocation failure

[ Upstream commit 219c81f7d1d5a89656cb3b53d3b4e11e93608d80 ]

When driver fail to allocate an entry to send command to FW, it must
notify the calling function and release the memory allocated for
this command.

Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB adapters')
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c