net/mlx5: Fix incorrect raw command length parsing
authorAlex Vesker <valex@mellanox.com>
Fri, 25 May 2018 17:25:59 +0000 (20:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 12:27:36 +0000 (14:27 +0200)
commit5b3cc7f9b39a02a981a89e42df12dcbc610bff3f
treecadde444c63553d06fb970d758a1ede914457ea8
parente555ae018ba40c8259fa8bc3952e2f01d9bec89c
net/mlx5: Fix incorrect raw command length parsing

[ Upstream commit 603b7bcff824740500ddfa001d7a7168b0b38542 ]

The NULL character was not set correctly for the string containing
the command length, this caused failures reading the output of the
command due to a random length. The fix is to initialize the output
length string.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Alex Vesker <valex@mellanox.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