net/chelsio: Don't set N/A for not available FW

There is no need to set N/A if FW is not available.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Leon Romanovsky 2020-03-01 16:44:42 +02:00 committed by David S. Miller
parent 01e392aa49
commit 50ad85c28a

View File

@ -174,9 +174,7 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
sizeof(info->bus_info));
info->regdump_len = get_regs_len(dev);
if (!adapter->params.fw_vers)
strcpy(info->fw_version, "N/A");
else
if (adapter->params.fw_vers)
snprintf(info->fw_version, sizeof(info->fw_version),
"%u.%u.%u.%u, TP %u.%u.%u.%u",
FW_HDR_FW_VER_MAJOR_G(adapter->params.fw_vers),